- eZ Platform 1.0+
Run the following from your website root folder to install PrimeTranslationsBundle:
$ composer require primedigital/translations-bundle
Activate required bundles in app/AppKernel.php
file by adding them to the $bundles
array in registerBundles
method:
public function registerBundles()
{
...
$bundles[] = new Lexik\Bundle\TranslationBundle\LexikTranslationBundle();
$bundles[] = new Prime\Bundle\TranslationsBundle\PrimeTranslationsBundle();
return $bundles;
}
In your main routing configuration file probably routing.yml
add:
prime_translations:
resource: '@PrimeTranslationsBundle/Resources/config/routing.yml'
lexik_translation:
fallback_locale: [en] # (required) default locale(s) to use
managed_locales: [en, fr] # (required) locales that the bundle has to manage
base_layout: "PrimeTranslationsBundle::pagelayout.html.twig"
grid_input_type: text # text|textarea
grid_toggle_similar: false
storage:
type: orm # orm | mongodb | propel
$ php bin/console doctrine:schema:update --force
$ php bin/console lexik:translations:import AppBundle
Clear the eZ Publish caches with the following command:
$ php bin/console assets:install --symlink
Clear the eZ Publish caches with the following command:
$ php bin/console cache:clear
For more detailed configuration, please check documentation.