PHPackages                             arxy/entity-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. [Database &amp; ORM](/categories/database)
4. /
5. arxy/entity-translations-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

arxy/entity-translations-bundle
===============================

This bundle provides translations for entities in your project. It's a bundle, but can be used standalone.

3.1.0(5y ago)101.3k2MITPHPPHP ^7.2CI failing

Since Aug 1Pushed 4y ago6 watchersCompare

[ Source](https://github.com/Warxcell/EntityTranslationsBundle)[ Packagist](https://packagist.org/packages/arxy/entity-translations-bundle)[ RSS](/packages/arxy-entity-translations-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (5)Versions (14)Used By (0)

EntityTranslationsBundle
========================

[](#entitytranslationsbundle)

[![Build Status](https://camo.githubusercontent.com/d966ab1f22e1ceccf292907cd8cdccda79d4c82788813b79fd14922df214c4ca/68747470733a2f2f7472617669732d63692e6f72672f5761727863656c6c2f456e746974795472616e736c6174696f6e7342756e646c652e706e67)](https://travis-ci.org/Warxcell/EntityTranslationsBundle)

[![codecov](https://camo.githubusercontent.com/9faf22fca6b958a49c3d46060126bf6fe57c241dede90bbb64625917aef7c132/68747470733a2f2f636f6465636f762e696f2f67682f5761727863656c6c2f456e746974795472616e736c6174696f6e7342756e646c652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Warxcell/EntityTranslationsBundle)

Very simple bundle that allows you to translate your entities.

Installation:
-------------

[](#installation)

###### it is recommented to install X.Y.\* version - This project follow [semver](https://semver.org/) - Patch versions will be always compatible with each other. Minor versions may contain minor BC-breaks.

[](#it-is-recommented-to-install-xy-version---this-project-follow-semver---patch-versions-will-be-always-compatible-with-each-other-minor-versions-may-contain-minor-bc-breaks)

- composer require arxy/entity-translations-bundle
- Register bundle in AppKernel.php: `new Arxy\EntityTranslationsBundle\ArxyEntityTranslationsBundle()`
- Translatable must `implements \Arxy\EntityTranslationsBundle\Model\Translatable`
- Translations must `implements \Arxy\EntityTranslationsBundle\Model\Translation`
- You must have 1 entity containing all the languages, it must `implements \Arxy\EntityTranslationsBundle\Language`
- Include services.xml in config.yml:

```
imports:
    - { resource: "@ArxyEntityTranslationsBundle/Resources/config/services.xml" }

```

No configuration is needed. Current and fallback locales are taken from Symfony:

[Symfony Translations](http://symfony.com/doc/current/translation.html#configuration)
[How to Work with the User's Locale](https://symfony.com/doc/current/translation/locale.html)

```
framework:
    translator:      { fallbacks: ["bg", "de"] }
```

Example entities:

Language

```
