A symfony2 translation bundle
- Translation management
- Easier Testing
not complete! Early stage development
right now you can use this bundle for easier testing. since it highjacks the default translator and always returns your translation keys. which means: if you update your translations, your tests will still pass.
When enabled it will catch all your translation keys and store them in the database. so that you can translate them using a web interface, you can have a look at it: app_dev.php/kjda_translation/
exporting translations to resource files.
importing resource files to the database.
a better domain management & domain detection while capturing keys.
Add the following to your composer.json
"require": {
"kjda/translation-bundle": "dev-master"
}
then
php composer.phar update kjda/translation-bundle
Register bundle in app/AppKernel.php:
$bundles = array(
.....,
new Kjda\TranslationBundle\KjdaTranslationBundle(),
);
app/config_dev.yml:
assetic:
bundles: [ KjdaTranslationBundle, AcyouSomeOtherBundle ]
app/routing.yml:
kjda_translation:
resource: "@KjdaTranslationBundle/Resources/config/routing.yml"
translation interface: /app_dev.php/kjda_translation