Download the PHP package coolshop/cool-sonata-translation-bundle without Composer
On this page you can find all versions of the php package coolshop/cool-sonata-translation-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coolshop/cool-sonata-translation-bundle
More information about coolshop/cool-sonata-translation-bundle
Files in coolshop/cool-sonata-translation-bundle
Package cool-sonata-translation-bundle
Short Description Integration of translation into sonata admin
License MIT
Informations about the package cool-sonata-translation-bundle
CoolSonataTranslationBundle
The CoolSonataTranslationBundle is the bundle that manage to handle your Symfony Translations into Database. The integration with Sonata Admin is possible thanks to Ibrows
Installation
Add the following lines in your composer.json:
To start using the bundle, register the CoolSonataTranslationBundle in your application's kernel class:
Configuration
app/config/config.yml
Usage
Setup the translation table
In order to have some keys shown up in the admin panel, you have to import the translation files first. This is done through a command:
This command also has a "-c" so you can clear the database first. might be a bit faster for larger imports if your table is already filled.
Generate dummy translation files or using configuration
Since the TranslationLoader bases on files, you'd have to create empty files like "messages.en_US.db" for each language you want to use with your translation database. The files will be placed in app/Resources/translations/*
NOTE: each time you modify translations into DB you have to clear the cache in order to use the new one.
@TODO: make clear cache possible from admin panel.
Sonata Admin Integration
To include the bundle in the admin dashboard, add group "group.translation" to dashboard
That's all folks! Come to say Hi at Coolshop
All versions of cool-sonata-translation-bundle with dependencies
symfony/framework-bundle Version >=2.1
sonata-project/admin-bundle Version *