PHPackages                             netpeople/translation\_editor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. netpeople/translation\_editor

ActiveLibrary[Localization &amp; i18n](/categories/localization)

netpeople/translation\_editor
=============================

015PHP

Since Aug 7Pushed 13y ago1 watchersCompare

[ Source](https://github.com/Netpeople2005/TranslatorBundle)[ Packagist](https://packagist.org/packages/netpeople/translation_editor)[ RSS](/packages/netpeople-translation-editor/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

TranslatorBundle
----------------

[](#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 &amp; setup the bundle
------------------------------

[](#install--setup-the-bundle)

1. Fetch the source code

    Using Git to control your project from project root directory:

    ```
    git submodule add git://github.com/docteurklein/TranslatorBundle.git vendor/bundles/Knp/Bundle/TranslatorBundle
    ```

    By cloning repository:

    ```
    mkdir -p vendor/bundles/Knp/Bundle
    cd !$
    git clone git://github.com/docteurklein/TranslatoBundle.git
    ```

    By including into deps file:

    ```

    [TranslatorBundle]
    	git=git://github.com/docteurklein/TranslatorBundle.git
    	target=/bundles/Knp/Bundle/TranslatorBundle

    ```
2. Add the bundle to your `AppKernel` class

    ```
    // app/AppKernerl.php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Knp\Bundle\TranslatorBundle\KnpTranslatorBundle,
            // ...
        );
        // ...
    }
    ```
3. Add the Knp namespace to your autoloader

    ```
    // app/autoload.php
    $loader->registerNamespaces(array(
        'Knp' => __DIR__.'/../vendor/bundles',
        // your other namespaces
    );
    ```
4. Add routing

    ```
    // app/config/routing.yml

    knplabs_translator_admin:
        resource: @KnpTranslatorBundle/Resources/config/routing/edition.yml
            prefix:   /trans/admin

    knplabs_translator:
        resource: @KnpTranslatorBundle/Resources/config/routing/routing.yml
            prefix:   /trans
    ```

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
---------------------

[](#minimal-configuration)

This bundle requires the activation of the core translator:

```
``` yaml

// app/config/config.yml
framework:
    # ...
    translator:    { fallback: en }
    # ...

```

```

Additional configuration
------------------------

[](#additional-configuration)

This bundle relies on the Ext Core library. You can decide wheter or not it will be included automatically.

```
``` yaml

knplabs_translator:
    include_vendor_assets: false # defaults to true

```

```

Services
--------

[](#services)

This bundle introduces those services:

```
translator.dumper.csv                    container Knp\Bundle\TranslatorBundle\Dumper\CsvDumper
translator.dumper.xliff                  container Knp\Bundle\TranslatorBundle\Dumper\XliffDumper
translator.dumper.yaml                   container Knp\Bundle\TranslatorBundle\Dumper\YamlDumper
translator.writer                        container Knp\Bundle\TranslatorBundle\Translation\Translator

controllers are services too:

knplabs_translator.controller.edition    request   Knp\Bundle\TranslatorBundle\Controller\EditionController
knplabs_translator.controller.translator request   Knp\Bundle\TranslatorBundle\Controller\TranslatorController

```

API
---

[](#api)

```
``` php

class Knp\Bundle\TranslatorBundle\Translation\Translator extends Symfony\Bundle\FrameworkBundle\Translation\Translator
{

    public function isTranslated($id, $domain, $locale);

    public function update($id, $value, $domain, $locale);

    public function getResources($locale, $domain);

    public function getFallbackLocale();

    public function getCatalog($locale);

    public function getLocales();

    public function all();

```

```

Updating a given translation key is really simple:

```
``` php

$this->get('translator.writer')->update('the key to translate', 'the translated string', 'messages', 'en');

```

```

Rest API
--------

[](#rest-api)

- Update `english` translations files for domain `tests` with `translated value` for key `foo.bar.baz`

    ```
    curl -X PUT http://project-url/trans/  \
        -F 'id=foo.bar.baz' \
        -F 'domain=messages' \
        -F 'locale=en' \
        -F 'value=translate value'
    ```
- Get the translated value of key `foo.bar.baz` for `english` locale for `tests` domain

    ```
    curl http://project-url/trans/foo.bar.baz/tests/en
    ```

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7dfce0ba992917fc8ab92ebf5b2605d72b08c424b7a529374c88db6cbc36f34?d=identicon)[manuelj555](/maintainers/manuelj555)

---

Top Contributors

[![docteurklein](https://avatars.githubusercontent.com/u/109846?v=4)](https://github.com/docteurklein "docteurklein (75 commits)")[![manuelj555](https://avatars.githubusercontent.com/u/1214013?v=4)](https://github.com/manuelj555 "manuelj555 (19 commits)")

### Embed Badge

![Health badge](/badges/netpeople-translation-editor/health.svg)

```
[![Health](https://phpackages.com/badges/netpeople-translation-editor/health.svg)](https://phpackages.com/packages/netpeople-translation-editor)
```

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[renatomarinho/laravel-multi-language

Laravel Multi Language

235.1k](/packages/renatomarinho-laravel-multi-language)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
