PHPackages                             businessprocess/yii2-translation-center - 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. businessprocess/yii2-translation-center

ActiveYii2-extension[Localization &amp; i18n](/categories/localization)

businessprocess/yii2-translation-center
=======================================

Transaltion Center for Yii 2.0

v3.2.5(1y ago)03.3k↓50%MITPHP

Since Dec 27Pushed 1y agoCompare

[ Source](https://github.com/businessprocess/yii2-translation-center)[ Packagist](https://packagist.org/packages/businessprocess/yii2-translation-center)[ Docs](http://dev-api.translate.center/api-docs/)[ RSS](/packages/businessprocess-yii2-translation-center/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (20)Used By (0)

### Installing via Composer

[](#installing-via-composer)

The recommended way to install Guzzle is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of Guzzle:

```
composer require businessprocess/yii2-translation-center dev-master
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

Client configuration ( if you use advanced template )

```
/app/common/config/main.php
...php
'container' => [
        'singletons' => [
            'Kialex\TranslateCenter\Client' => [
                [],
                [
                    [
                        'login' => 'admin.center@center.ru',
                        'password' => 'qwerty',
                        'projectUuid' => 'xxxxxx-fxxx-4xx2-8c0a-35axxxxxx8'
                    ],
                ]
            ]
        ]
    ],
...

```

How to use:

```
$translateCenter = \Yii::createObject(\Kialex\TranslateCenter\Client::class);
$translateCenter->createResource([
    [
        'key' => 'someKey',
        'value' => 'someValue',
        'tags' => ['category1', 'category2']
    ],
    [
        'key' => 'someKey1',
        'value' => 'someValue1',
        'tags' => ['category3', 'category4']
    ]
], 'ru');
// Fetch 1st page resources (default 300 sources) with langs `ru`, `en` and `someGroup1` tag
$translateCenter->fetch([
    'langs' => 'ru,en',
    'tags' => 'someGroup1'
], 1);
```

You can mapping console controller to pulling translations ( if you use advanced template )

```
/app/console/config/main.php
...
'controllerMap' => [
        ...
        'translate-center' => [
            'class' => '\Kialex\TranslateCenter\Console\Controllers\TranslationCenterController',
            'staticGroups' => ['app', 'app_js', 'app_email'],
            'dynamicGroups' => ['db_product', 'db_product_category'],
            'staticStorageClass' => \Kialex\TranslateCenter\Storage\JsonFileStorage,
            'dynamicStorageClass' => \Translate\StorageManager\Storage\ElasticStorage,
          ],
    ],
...

```

Attention! This controller uses json storage to keep you transaltion, you should also configure i18n components:

```
...
'components' => [
    ...
    'i18n' => [
        'translations' => [
            'app*' => [
                'class' => 'yii\i18n\PhpMessageSource', // default Yii transaltion
                'fileMap' => [
                    'app'       => 'app.php',
                    'app/error' => 'error.php',
                ],
            ],
            '*' => [
                'class' => '\yii\i18n\JsonMessageSource', // Your tranlation fron Translate Center
                'basePath' => '@common/messages'
                // If you change this path, you shoud change it in//
            // `\Kialex\TranslateCenter\Storage\JsonFileStorage` as well
                    // You may do it via singletons or defenations in config
            ],
        ],
    ]
]
...
```

Using Redis as Message Source

- You need define redis component in your common app config

```
/app/common/config/main.php
'components' => [
    ...
    'redis' => [
        'class' => \yii\redis\Connection::class,
        'hostname' => 'localhost',
        'port' => 6359,
        'database' => 10,
    ],
    ...
]

```

If your redis component ID has another name, you should define it:

```
/app/common/config/main.php
'container' => [
    'singletons' => [
    ...
    \Kialex\TranslateCenter\Storage\RedisStorage::class => [
        'class' => \Kialex\TranslateCenter\Storage\RedisStorage::class,
        'redis' => 'other_redis_compoennt_id'
    ],
    ...
    ]
]

```

- In the controlle map change storage class to Redis Storage:

```
/app/console/config/main.php
...
'controllerMap' => [
        ...
        'translate-center' => [
            ...
            'staticStorageClass' => \Kialex\TranslateCenter\Storage\RedisStorage,
            ...
          ],
    ],
...

```

- Change message source to Redis

```
/app/console/config/main.php
'components' => [
    ...
    'i18n' => [
        'translations' => [
            ...
            '*' => ['class' => '\Kialex\TranslateCenter\Source\RedisSource'],
            ...
        ],
    ]
    ...
]

```

Fetching static resources to default Yii 2 translations:

```
# ./yii translation-center/pull-static-sources
...
// Now you can use:
\Yii::t('someGroup1', 'someKey');
...
// You also fetching dynamic resources, but not recommended for this version!
# ./yii translation-center/pull-dynamic-sources

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance43

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~104 days

Recently: every ~421 days

Total

19

Last Release

448d ago

Major Versions

v1.0.4 → v2.0.02020-04-21

v1.1.0 → v2.1.02020-04-22

v1.1.1 → v2.2.02020-05-29

v2.2.1 → v3.0.02020-06-10

### Community

Maintainers

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

---

Top Contributors

[![KAA87](https://avatars.githubusercontent.com/u/2129435?v=4)](https://github.com/KAA87 "KAA87 (3 commits)")[![motor-ua](https://avatars.githubusercontent.com/u/10684775?v=4)](https://github.com/motor-ua "motor-ua (2 commits)")[![kialex](https://avatars.githubusercontent.com/u/19323131?v=4)](https://github.com/kialex "kialex (1 commits)")[![vov41knk](https://avatars.githubusercontent.com/u/2713991?v=4)](https://github.com/vov41knk "vov41knk (1 commits)")

### Embed Badge

![Health badge](/badges/businessprocess-yii2-translation-center/health.svg)

```
[![Health](https://phpackages.com/badges/businessprocess-yii2-translation-center/health.svg)](https://phpackages.com/packages/businessprocess-yii2-translation-center)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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