Download the PHP package domis86/translator-bundle without Composer
On this page you can find all versions of the php package domis86/translator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download domis86/translator-bundle
More information about domis86/translator-bundle
Files in domis86/translator-bundle
Package translator-bundle
Short Description Easily edit Symfony2 translations while browsing your site
License WTFPL
Homepage http://github.com/domis86/TranslatorBundle
Informations about the package translator-bundle
domis86/TranslatorBundle
What is it ?
Symfony2 bundle which helps in translation.
A Symfony2 bundle which helps in editing of translations without need for editing the translations files. Edit can be performed via symfony WebDebugToolbar (translations from current request) or backend admin interface (all translations). Translations are stored in db and retrieved in a efficient way (+cached).
The Symfony2 WebDebugToolbar shows number of translations used in current request:
If you click on it a Edit Dialog will appear where you can edit translations used in current request:
- indicates that translation for this language is missing - click and add it!
- Black text is current translation stored in db. Blue text means that it is translation loaded from file - via default Symfony2 Translator service (messages.en.yml etc). It will be used if there is no translation in DB.
In this example hello
is translated to Hallo
when language is german, but when language is french then it is translated to Bonjour
(which resides somewhere in messages.fr.yml). Hit ( Click to edit )
above Bonjour
to change it.
You can also browse [your_domain.com]/app_dev.php/domis86translator/backend
to edit all translations used in your application.
Features
- edit/add translations without need of messing with translations files
- integration with Symfony2 WebDebugToolbar (dev env)
- info how many translated/used messages was in request
- robust Edit Dialog (js) activated by clicking on WebDebugToolbar
- search/sort your translations by name, domain name, content
- just click on translation, edit it in place and save
- click on
Help
button in Dialog for more info
- manage all translations from you application in Backend (same features as Edit Dialog)
- translations are stored in DB, and cached per Action
Installation
Add the domis86/translator-bundle
package to your require
section in the composer.json
file:
Add the Domis86TranslatorBundle to your AppKernel:
Enable this bundle and configure managed_locales
in your config.yml
:
Enable Dialog for dev
environment in your config_dev.yml
:
Add routes in your routing_dev.yml
:
Update your database:
Install assets
Optional config:
If your web server's DocumentRoot points to some other dir than symfony's /web
dir then you can change domis86_translator.assets_base_path
accordingly (default is /bundles/domis86translator/
).
Assuming your app.php url is http://localhost/uglydirectory/web/app.php
then you should do:
Used libraries:
All versions of translator-bundle with dependencies
symfony/symfony Version >=2.6
symfony/framework-bundle Version >=2.3
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
twig/extensions Version ~1.0