I am currently building an application for an architecture running in the amazon cloud (some webservers w/ php5.3, load balancing, PostgreSQL).
A key feature of my (PHP5) application is, that everything (on the frontend) has to be translatable into various languages, so there will be lots of strings, which are represented by a "token", that have to be translated.
My Question ist: Where would you store these translations?
- Store the translations in files on the local (webserver) disks?
- Store the translations in files on a central storage?
- Store the translations in the database?
- Elsewhere?
Additional info: No matter where the translations will be stored - there will be some caching (Redis, + template cache), so the files / DB will not be queried on every rendered page.
Each of the above solutions has pros and cons, and after lots of discussion in my team, we did not find a solution that we all were happy with.
Some of our thoughts:
- Files are easier to maintain (update translations via overwriting files)
- DB-Tables are more flexible (build a nice translation interface around the translation data)
- DB-Tables are only stored once; so this is cheaper than lots of files in the cloud, i think (we pay for storage and data transfer)
- Central storage for the files could be a bottleneck
So what is your oppinion?
Greetings, Robert