PHPackages                             modera/translations-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. modera/translations-bundle

ActiveSymfony-bundle[Localization &amp; i18n](/categories/localization)

modera/translations-bundle
==========================

v5.0.0(1y ago)16.2k14MITPHPPHP &gt;=7.4CI failing

Since Jul 22Pushed 1y ago8 watchersCompare

[ Source](https://github.com/modera/ModeraTranslationsBundle)[ Packagist](https://packagist.org/packages/modera/translations-bundle)[ RSS](/packages/modera-translations-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (20)Used By (4)

ModeraTranslationsBundle
========================

[](#moderatranslationsbundle)

Bundle defines architecture and provides utilities which make process of translating your web-site to many languages an easier process.

Bundle's has been developed to simplify a process of localizing your bundles, to achieve that it does several things:

- Defines an extensible architecture that can be used to describe what type of files must be scanned to extract translation tokens, at the moment we have support for these: twig templates, php files.
- When tokens are extracted that can be published to a database. You can use your favorite toolkit to translate them ( some CRUD generator, for example )
- When tokens have been translated you can use `modera:translations:compile` command to take the tokens from database and compile them back to physical files that Symfony can work with.

Installation
------------

[](#installation)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

```
composer require modera/translations-bundle:5.x-dev
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

This bundle should be automatically enabled by [Flex](https://symfony.com/doc/current/setup/flex.html). 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:

```
