Released version 2.0
Changelog:
- Twig filters
translate
andtranslation
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 }}
- Drop support for Symfony 2.7. Now only ~2.8 and ~3.0 are supported.
- Add tests for forms, translator and other components.
- Load translations on postPersist event for Doctrine.
- Use brand-new Form Type for translations instead of extending Symfony's Collection Type.
- Method
setTranslatable(Translatable $translatable)
forEditableTranslation
is not required now. You should useaddTranslation
andremoveTranslation
if you use form (by_reference=false). - Remove
vm5_entity_translations.translation_loader
service. Usevm5_entity_translations.translator
or FQCN instead. - Add Bootstrap Form template using tabs for each language.
- Add
translate
method inTranslator
: 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.