PHPackages                             cinghie/yii2-dictionary - 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. cinghie/yii2-dictionary

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

cinghie/yii2-dictionary
=======================

Yii2 Dictionary to create, manage, and delete Multilanguage Dictionary in a Yii2 site.

0.3.1(7y ago)12571[3 issues](https://github.com/cinghie/yii2-dictionary/issues)BSD-3-ClausePHP

Since Mar 20Pushed 3y ago2 watchersCompare

[ Source](https://github.com/cinghie/yii2-dictionary)[ Packagist](https://packagist.org/packages/cinghie/yii2-dictionary)[ Docs](https://github.com/cinghie/yii2-dictionary)[ RSS](/packages/cinghie-yii2-dictionary/feed)WikiDiscussions master Synced today

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

Yii2 Dictionary
===============

[](#yii2-dictionary)

[![License](https://camo.githubusercontent.com/64e6e2a7ff65b4fe106e54974453530948c35da111e331eb7a8cfd143fda13c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63696e676869652f796969322d64696374696f6e6172792e737667)](https://camo.githubusercontent.com/64e6e2a7ff65b4fe106e54974453530948c35da111e331eb7a8cfd143fda13c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63696e676869652f796969322d64696374696f6e6172792e737667)[![Latest Stable Version](https://camo.githubusercontent.com/5b076d88f450e793f803d7938e9032ef4f3bed0c7a15cb7a368a89eced867532/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f63696e676869652f796969322d64696374696f6e6172792e737667)](https://camo.githubusercontent.com/5b076d88f450e793f803d7938e9032ef4f3bed0c7a15cb7a368a89eced867532/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f63696e676869652f796969322d64696374696f6e6172792e737667)[![Latest Release Date](https://camo.githubusercontent.com/6da00786a726ab0ec6e2a564526a752a3f6bf86cfb85baf1127507b265d26963/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f63696e676869652f796969322d64696374696f6e6172792e737667)](https://camo.githubusercontent.com/6da00786a726ab0ec6e2a564526a752a3f6bf86cfb85baf1127507b265d26963/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f63696e676869652f796969322d64696374696f6e6172792e737667)[![Latest Commit](https://camo.githubusercontent.com/9bc283859cfd6b497e4f1b9e94920e986ca4bccaab1b09a29d6829514540a3ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e676869652f796969322d64696374696f6e6172792e737667)](https://camo.githubusercontent.com/9bc283859cfd6b497e4f1b9e94920e986ca4bccaab1b09a29d6829514540a3ef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f63696e676869652f796969322d64696374696f6e6172792e737667)[![Total Downloads](https://camo.githubusercontent.com/bf8aa2672c456dfc5f43a239bc5d8cd85abbec2d4203fae3c65e0fd1edd3d630/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63696e676869652f796969322d64696374696f6e6172792e737667)](https://packagist.org/packages/cinghie/yii2-dictionary)

Yii2 Dictionary to create, manage, and delete Multilanguage Dictionary in a Yii2 site.

Features
--------

[](#features)

- Create a dictionary with key/value: for each key is possible to associate a translation to each language set on config
- Import from CSV
- Download as Plist

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require cinghie/yii2-dictionary "*"

```

or add

```
"cinghie/yii2-dictionary": "*"

```

Create database schema
----------------------

[](#create-database-schema)

Run the following command:

```
$ php yii migrate/up --migrationPath=@vendor/cinghie/yii2-dictionary/migrations

```

Configuration
-------------

[](#configuration)

Set on your configuration:

```
// Yii2 Dictionary
'dictionary' => [
	'class' => 'cinghie\dictionary\Dictionary',
	'dictionaryRoles' => ['admin'];
	'languages' => [
		'it-IT' => 'it-IT',
		'en-GB' => 'en-GB',
		'es-ES' => 'es-ES',
		'fr-FR' => 'fr-FR',
		'de-DE' => 'de-DE',
		'ch-CN' => 'ch-CN',
		'pr-PR' => 'pr-PR',
		'ru-RU' => 'ru-RU',
	],
	'showPlistDownload' => true,
	'showTitles' => false,
	'plistFolderPath' => '@webroot/dictionary/plist/';
	'uploadFolderPath' => '@webroot/dictionary/csv/'
	'uploadMaxFileSize' => 5242880
],

```

Set all language in Tag mode

Filters
-------

[](#filters)

If you have a Yii2 App Advanced (frontend/backend) you can exclude frontend actions

```
'modules' => [

	'dictionary' => [
		'class' => 'cinghie\dictionary\Dictionary',
		'as frontend' => 'cinghie\dictionary\filters\FrontendFilter',
	]

],

```

Overrides
---------

[](#overrides)

Override controller example, on modules config

```
'modules' => [

	'dictionary' => [
		'class' => 'cinghie\dictionary\Dictionary',
		'controllerMap' => [
			'keys' => 'app\controllers\KeysController',
		]
	]

],

```

Override models example, on modules config

```
'modules' => [

	'dictionary' => [
		'class' => 'cinghie\dictionary\Dictionary',
		'modelMap' => [
			'Keys' => 'app\models\Keys'
		]
	]

],

```

Override view example, on components config

```
'components' => [

	'view' => [
		'theme' => [
			'pathMap' => [
				'@cinghie/dictionary/views/keys' => '@app/views/dictionary/keys',
			],
		],
	],

],

```

Get Translation Value
---------------------

[](#get-translation-value)

```
use cinghie\dictionary\models\Keys;

$dictionary = new Keys();

$key   = $dictionary::findOne(KeyID);
$value = $key->getTranslation(LangTag)->attributes['value'] ?: ''

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~16 days

Total

4

Last Release

2558d ago

### Community

Maintainers

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

---

Top Contributors

[![cinghie](https://avatars.githubusercontent.com/u/2445152?v=4)](https://github.com/cinghie "cinghie (51 commits)")

---

Tags

yii2-translationsyii2 dictionaryyii2 translation

### Embed Badge

![Health badge](/badges/cinghie-yii2-dictionary/health.svg)

```
[![Health](https://phpackages.com/badges/cinghie-yii2-dictionary/health.svg)](https://phpackages.com/packages/cinghie-yii2-dictionary)
```

###  Alternatives

[tigrov/yii2-country

Country data for Yii2 using Intl extension and more.

151.1k](/packages/tigrov-yii2-country)

PHPackages © 2026

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