Translations and Symfony2 in the database

File-based translation does not work for me because clients need to change the text.

So, I am thinking of implementing this interface to retrieve data from a database and cache the results in the APC cache. This is a good decision?

+7
source share
3 answers
+7
source

Take a look at the Translation Behavior Extension for Doctrine 2. The StofDoctrineExtensionsBundle integrates it with Symfony.

+1
source

You might want to take a look at this Loader + Resource using a PDO connection: https://gist.github.com/3315472

Then you only need to make it cache accessible, for example, add memcache, apc, .. between them. If so, you can disable the file caching of Translator itself.

0
source

All Articles