arxy/entity-translations-bundle
Use Arxy namespace.
Bugfix: when translations form is used more than once in same document
Twig form theme now uses form_row instead of self rendering.
Few fixes in documentation and tests.
Changelog:
translate and translation now accept arguments in different order and locale is not required:Before:
{{ news|translate('en', 'title')|lower }}
Now
{{ news|translate('title')|lower }}
{{ news|translate('title', 'en')|lower }}
setTranslatable(Translatable $translatable) for EditableTranslation is not required now. You should use addTranslation and removeTranslation if you use form (by_reference=false).vm5_entity_translations.translation_loader service. Use vm5_entity_translations.translator or FQCN instead.translate method in Translator: You can now use: Translator::translate($translatable, 'field', $locale = null) to retrieve translated field directly. Internally translator use PropertyAccessor and it's required to pass it thru: setPropertyAccessor method.The signature of Translatable is changed:
before
public function setCurrentTranslation(Translation $translation);
now:
public function setCurrentTranslation(Translation $translation = null);
Fix few deprecations from Symfony 3.4. Fix wrong FormType Definition
New Twig Extension for easy usage from Twig. Separate Translator from Loader.
If you wish to get single translation without initialize it, you can use:
/** [@var](https://github.com/var) $translation \VM5\EntityTranslationBundle\Model\Translation */
$translation = $this->get('vm5_entity_translations.translation_loader')->getTranslation($entity, 'bg');
Argument #2 can be either string locale or Language entity.
How can I help you explore Laravel packages today?