Download the PHP package docteurklein/translator-bundle without Composer
On this page you can find all versions of the php package docteurklein/translator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download docteurklein/translator-bundle
More information about docteurklein/translator-bundle
Files in docteurklein/translator-bundle
Package translator-bundle
Short Description This bundle's purpose is to provide an interface for edition, addition and deletion of translations messages.
License MIT
Informations about the package translator-bundle
TranslatorBundle
This bundle's purpose is to provide an interface for edition, addition and deletion of translations messages.
Currently supported formats:
- YAML
- XLIFF
- CSV
Install & setup the bundle
-
Install via composer
-
Add the bundle to your
AppKernel
class - Add routing
These route files provide the following routes:
[router] Current routes
Name Method Pattern
knplabs_translator_list GET /trans/admin/list
knplabs_translator_get GET /trans/{id}/{domain}/{locale}
knplabs_translator_put PUT /trans/
Minimal configuration
This bundle requires the activation of the core translator:
Additional configuration
This bundle relies on the Ext Core library. You can decide wheter or not it will be included automatically.
Services
This bundle introduces those services:
knp_translator.dumper.csv container Knp\Bundle\TranslatorBundle\Dumper\CsvDumper
knp_translator.dumper.xliff container Knp\Bundle\TranslatorBundle\Dumper\XliffDumper
knp_translator.dumper.yaml container Knp\Bundle\TranslatorBundle\Dumper\YamlDumper
knp_translator.writer container Knp\Bundle\TranslatorBundle\Translation\Writer
controllers are services too:
knp_translator.controller.edition request Knp\Bundle\TranslatorBundle\Controller\EditionController
knp_translator.controller.translator request Knp\Bundle\TranslatorBundle\Controller\TranslatorController
API
Updating a given translation key is really simple:
Rest API
-
Update
english
translations files for domaintests
withtranslated value
for keyfoo.bar.baz
- Get the translated value of key
foo.bar.baz
forenglish
locale fortests
domain