Reputation: 12867
I'm developing a website, and want to make multi language support, but I'm doubting where I should store the phrases.
Storing them in a database makes it easier to create systems where you crowdsource the translation, in a similar facion facebook and twitter are doing. The disadvantage is that querying a database for phrases can be slow, especially when there are a lot of phrases on a page.
Storing them in a file makes retrieval faster, but makes them harder to manage and maintain.
What are some other pros and cons?
Upvotes: 0
Views: 216
Reputation: 38300
If the phrases need to change often, then store them in a database. If the phrases change infrequently or never, and you are using java, store them in a resource bundle.
If you are worried about load time from a db, you can cache the phrases and periodically update the cache.
Upvotes: 1