Bundle provide set of basic utilities that allow you to define your site languages configuration in a config file and then have it synchronized with database so you can establish database relations between languages and some other entities that your project has.
composer require modera/languages-bundle:5.x-devThis command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
This bundle should be automatically enabled by Flex.
In case you don't use Flex, you'll need to manually enable the bundle by
adding the following line in the config/bundles.php file of your project:
<?php
// config/bundles.php
return [
// ...
Modera\LanguagesBundle\ModeraLanguagesBundle::class => ['all' => true],
];This is a sample configuration:
// app/config/config.yml
modera_languages:
- { locale: en }
- { locale: ru, is_enabled: false }
- { locale: et }Later if you remove a language from modera_languages and run modera:languages:config-sync command then a database
record which corresponded to a deleted from a config file language will be marked as isEnabled = false.
bin/console doctrine:schema:update --forcebin/console modera:languages:config-syncThis bundle is under the MIT license. See the complete license in the bundle: Resources/meta/LICENSE