Import / Export translation feature for Symfony 2 projects
- If you use composer, add ItkgDelayEventBundle bundle as a dependency to the composer.json of your application
"require": {
"itkg/translation-bundle": "dev-master"
},
- Add ItkgTranslationBundle to your application kernel.
// app/AppKernel.php
<?php
// ...
public function registerBundles()
{
$bundles = array(
// ...
new Itkg\TranslationBundle\ItkgTranslationBundle(),
);
}
- Export yml files to a CSV
app/console itkg:translation:convert --path ./ --input=yml --output=csv --output-path=/var/www/mhps/translations
- Import csv files to a yml
app/console itkg:translation:convert --path ./translations/ --input=csv --output=yml