PHPackages                             argentum/translation-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. argentum/translation-bundle

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

argentum/translation-bundle
===========================

Provides a database storage for translations and GUI for editing them

v1.0.3(8y ago)51.3k↓50%MITPHPPHP &gt;=5.4.0

Since May 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/argentumua/ArgentumTranslationBundle)[ Packagist](https://packagist.org/packages/argentum/translation-bundle)[ Docs](http://argentum.ua)[ RSS](/packages/argentum-translation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (13)Versions (5)Used By (0)

ArgentumTranslationBundle
=========================

[](#argentumtranslationbundle)

[![SensioLabsInsight](https://camo.githubusercontent.com/6100d138656446a7906df88661da7d3afa28a24d3a8d81094b63d9f88dc223f5/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31613735313766612d356666312d343935342d613961652d3262363161366137623439302f6d696e692e706e67)](https://insight.sensiolabs.com/projects/1a7517fa-5ff1-4954-a9ae-2b61a6a7b490)[![Build Status](https://camo.githubusercontent.com/d923079c382a3c68297772f862d364108a9cd354e14dc20c743d7116e706edc2/68747470733a2f2f7472617669732d63692e6f72672f617267656e74756d75612f417267656e74756d5472616e736c6174696f6e42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/argentumua/ArgentumTranslationBundle)[![Coverage Status](https://camo.githubusercontent.com/dc0d087a5bdbde856ec46d8f593d1afd7f660a146c5a487541b6dc8629480932/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f617267656e74756d75612f417267656e74756d5472616e736c6174696f6e42756e646c652e737667)](https://coveralls.io/r/argentumua/ArgentumTranslationBundle)[![Latest Stable Version](https://camo.githubusercontent.com/4f1a7d40a5076c77c7ce2c2b15cea092c8d2343516fe94f7cca3392171bd42f2/68747470733a2f2f706f7365722e707567782e6f72672f617267656e74756d2f7472616e736c6174696f6e2d62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/argentum/translation-bundle)[![License](https://camo.githubusercontent.com/6833444716fde5b70217ee79e3d327b905e52e45a18813852869a1bc2bb33b6e/68747470733a2f2f706f7365722e707567782e6f72672f617267656e74756d2f7472616e736c6174696f6e2d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/argentum/translation-bundle)

ArgentumTranslationBundle provides a database storage for translations and GUI for editing them.

This bundle supports PHP 5.4+ and Symfony 2.3+.

The bundle combines the power of the following bundles:

- [doctrine/orm](https://packagist.org/packages/doctrine/orm)
- [knplabs/doctrine-behaviors](https://packagist.org/packages/knplabs/doctrine-behaviors)
- [a2lix/translation-form-bundle](https://packagist.org/packages/a2lix/translation-form-bundle)
- [sonata-project/admin-bundle](https://packagist.org/packages/sonata-project/admin-bundle)

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

[](#installation)

Install the bundle with composer:

```
composer require argentum/translation-bundle:dev-master
```

Register the bundle in `app/AppKernel::registerBundles()`:

```
$bundles = array(
    // ...
    new Argentum\TranslationBundle\ArgentumTranslationBundle(),
    // ...
);
```

Configuration
-------------

[](#configuration)

In the `parameters.yml` you should configure a list of locales:

```
parameters:
    locales:
        - ru
        - uk
        - en
```

Then in the `config.yml` you should add the following options:

```
a2lix_translation_form:
    locales: %locales%

argentum_translation:
    locales: %locales%
```

Make sure you have registered [KnpLabs DoctrineBehaviors Listeners](https://github.com/KnpLabs/DoctrineBehaviors#listeners) in your `config.yml`:

```
imports:
    - { resource: ../../vendor/knplabs/doctrine-behaviors/config/orm-services.yml }
```

and have registered A2lixTranslationFormBundle in `app/AppKernel::registerBundles()`:

```
$bundles = array(
    // ...
    new A2lix\TranslationFormBundle\A2lixTranslationFormBundle(),
    // ...
);
```

And finally, create translation tables in your database:

```
app/console doctrine:schema:update --force
```

or create a migration and execute it:

```
app/console doctrine:migrations:diff
app/console doctrine:migrations:migrate
```

Translation editor
------------------

[](#translation-editor)

Now you can use GUI for editing the translations.

The bundle will automatically add additional items in the menu of your Sonata Admin. If you have customized the menu, you should add Translation group in `config.yml`:

```
sonata_admin:
    dashboard:
        groups:
            // ...
            Translation: ~
```

The list of all domains is located at URL something like (depends on the base location of Sonata Admin in your project): `/admin/argentum/translation/translationdomain/list`.

Loading order
-------------

[](#loading-order)

When merging all translations together translations from files in all bundles will be loaded, and then all translations from the database will be loaded. Thus, translations from the database can override any translation from the translation files in your project.

Proposed workflow
-----------------

[](#proposed-workflow)

Firstly, when developing your project you should use admin panel to create all necessary domains and add all necessary translations to them.

Secondly, when your bundle is ready, you should export all translations for the bundle domain into the bundle translation files and commit them to VCS.

And finally, when your project is started, you or your client can edit any translation without need to edit project files.

Cache
-----

[](#cache)

All translations are cached in the cache files and will be loaded from the database only once after clearing the cache.

Export
------

[](#export)

This bundle allows you to export translations from the database for single domain or all domains in the specified directory for the specified locales using the specified format.

Export all translations to the directory:

```
app/console translation:export --dir=/path/to/translations
```

Export translations for domain "messages":

```
app/console translation:export --dir=/path/to/translations messages
```

Export translations for domain "messages" and locales "ru" and "uk" in xliff format:

```
app/console translation:export --dir=/path/to/translations --locales="ru,uk" --format=xlf messages
```

Import
------

[](#import)

This bundle allows you to import translations from files into the database.

Import all translations from the specified directory:

```
app/console translation:import --dir=/path/to/translations
```

Import translations from the directory only for the domain "messages":

```
app/console translation:import --dir=/path/to/translations messages
```

Import translations from the directory only for the domain "messages" and locales "ru" and "uk":

```
app/console translation:import --dir=/path/to/translations --locales="ru,uk" messages
```

Import translations from the specified bundles:

```
app/console translation:import --bundles="SonataAdminBundle, SonataUserBundle"
```

Import translations from the entire project including all bundles, Form and Validation components, and local application translations:

```
app/console translation:import
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~425 days

Total

4

Last Release

3098d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e4ae642c5f1ad16c9b07e976096123f9ef8d50ee7df05123ed1e7f55b29caa9?d=identicon)[javer](/maintainers/javer)

![](https://www.gravatar.com/avatar/6550bb7ef5944906cf6e420101e73d5682d0e016f647954f35914c8087bd89b0?d=identicon)[argentum](/maintainers/argentum)

---

Top Contributors

[![javer](https://avatars.githubusercontent.com/u/591296?v=4)](https://github.com/javer "javer (18 commits)")

---

Tags

i18ntranslationtranslatabledoctrine2sonata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/argentum-translation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/argentum-translation-bundle/health.svg)](https://phpackages.com/packages/argentum-translation-bundle)
```

###  Alternatives

[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[a2lix/translation-form-bundle

Translate your doctrine objects easily with some helpers

3376.9M38](/packages/a2lix-translation-form-bundle)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)[sonata-project/translation-bundle

SonataTranslationBundle

771.7M10](/packages/sonata-project-translation-bundle)[leaseweb/gettext-translation-bundle

Easy to use and native (faster) gettext translation support

2460.6k](/packages/leaseweb-gettext-translation-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
