Download the PHP package braune-digital/translation-base-bundle without Composer
On this page you can find all versions of the php package braune-digital/translation-base-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download braune-digital/translation-base-bundle
More information about braune-digital/translation-base-bundle
Files in braune-digital/translation-base-bundle
Package translation-base-bundle
Short Description TranslationBase bundle
License MIT
Informations about the package translation-base-bundle
BrauneDigitalTranslationBaseBundle
This Symfony2-Bundle provides basic features for translations and offers SonataAdmin integration.
Requirements
In order to install this bundle you will need:
- KNPDoctrineBehaviors (Basic Translatable functions)
- DoctrineORM (Entity Persistence)
If you want to use SonataAdmin integration you need a few more:
- SonataAdmin (Backend Management)
- A2LixTranslationFormBundle (Translation Form-Rendering)
- An ckeditor field maybe from
IvoryCKEditorBundle
Installation
Just run composer:
And enable the Bundle in AppKernel.php:
Configuration
You may want to use an alternative Admin-Layout where you have a Dropdown Menu instead of the translation tabs:
Just configure SonataAdmin and A2lix to use the extended layouts in your config.yml
.
Usage
Translatable properties of an entity (YourEntity) are moved to a new YourEntityTranslation entity:
Entity:
The magic __call()
method is used to delegate a call to a translation property. For some Bundles (like SonataAdmin) you still need to define the wanted methods (e.g. getTitle
). In most cases for SonataAdmin a __toString
-method comes in handy for Relations as well.
EntityTranslation:
You still need to register both Entities in Doctrine, but you do not have to worry about the translation relations as they are dynamically added by DoctrineBehaviors, so you just need to define the normal fields and relations.
SonataAdmin Integration
This Bundle provides a Basic TranslationAdmin which you might want to extend from:
Languages
This Bundle also provides a basic Language Entity, which can be managed through SonataAdmin as well.
Todo
Add requirements with versions in composer.json
.
All versions of translation-base-bundle with dependencies
a2lix/translation-form-bundle Version 2.0.4
egeloen/ckeditor-bundle Version 2.5.2