PHPackages                             phuongdev89/yii2-multi-language - 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. phuongdev89/yii2-multi-language

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

phuongdev89/yii2-multi-language
===============================

This will help multi-language for Yii2

2.1.0(3y ago)15MITPHP

Since Aug 29Pushed 2y agoCompare

[ Source](https://github.com/phuongdev89/yii2-multi-language)[ Packagist](https://packagist.org/packages/phuongdev89/yii2-multi-language)[ RSS](/packages/phuongdev89-yii2-multi-language/feed)WikiDiscussions master Synced 1mo ago

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

yii2-multi-language
===================

[](#yii2-multi-language)

[![Packagist Version](https://camo.githubusercontent.com/8a9dbaf67deb17be43064f04441bd6fe65832ca48efcd1f7e645c64e19e2d989/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068756f6e6764657638392f796969322d6d756c74692d6c616e67756167652e7376673f7374796c653d666c6174)](https://packagist.org/packages/phuongdev89/yii2-multi-language)[![Total Downloads](https://camo.githubusercontent.com/9968f64cb58f126f87b139508af66ef89b3706d01f9d52ada69ab340d5eef8e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068756f6e6764657638392f796969322d6d756c74692d6c616e67756167652e7376673f7374796c653d666c6174)](https://packagist.org/packages/phuongdev89/yii2-multi-language)

This module allow you to create multi language use database. By default, Yii use Yii::t() for multi language. But you must stored the sentences on file, and it never suggested keywords for you. Now you can store it on mySql.

Requirements
------------

[](#requirements)

- [Yii 2](https://packagist.org/packages/yiisoft/yii2)
- [Yii 2 Bootstrap](https://packagist.org/packages/yiisoft/yii2-bootstrap)
- [Kartik-v Yii 2 Grid](https://packagist.org/packages/kartik-v/yii2-grid)
- [Kartik-v Yii 2 editable](https://packagist.org/packages/kartik-v/yii2-editable)
- [phuongdev89 Yii 2 Locale Urls](https://packagist.org/packages/phuongdev89/yii2-localeurls)

Install &amp; config:
---------------------

[](#install--config)

### Install

[](#install)

Preferred way to install this extension through [composer](http://getcomposer.org)
Either run

```
composer require phuongdev89/yii2-multi-language "^2.0"

```

Or add to `require` section of `composer.json` then run `composer update`

```
"phuongdev89/yii2-multi-language" : "^2.0"

```

### Config:

[](#config)

```
[php]
    'language'   => 'en', //TODO Change this to 2 characters
    .....................
    'bootstrap'           => [
        'log',
        'multiLanguage',
    ],
    'components' => [
        'multiLanguage' => [
           'class' => '\phuongdev89\language\Component',
        ],
    ],
    'modules'    => [
        'gridview' => [
            'class' => '\kartik\grid\Module',
        ],
        'language' => [
        'class'    => '\phuongdev89\language\Module',
        /*TODO uncommented if you want to custom view*/
        //'viewPath' => '@app/vendor/phuongdev89/yii2-multi-language/src/views',
        /*TODO uncommented if you want to change suffix of translated table / model.
        should be one word, lowercase only.*/
        //'suffix' => 'translate',
        ],
    ],

```

Run Yii Migration, you will have two default language (English &amp; Vietnamese):

```
php yii migrate/up --migrationPath=@vendor/phuongdev89/yii2-multi-language/src/migrations

```

Usage
-----

[](#usage)

[LanguageWidget](https://github.com/phuongdev89/yii2-multi-language/blob/master/docs/widget.md)

[Multi language on model](https://github.com/phuongdev89/yii2-multi-language/blob/master/docs/multi.md)

[Translate](https://github.com/phuongdev89/yii2-multi-language/blob/master/docs/translate.md)

[Custom Url Route](https://github.com/phuongdev89/yii2-multi-language/blob/master/docs/route.md)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Unknown

Total

1

Last Release

1215d ago

### Community

Maintainers

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

---

Top Contributors

[![navagroup](https://avatars.githubusercontent.com/u/8248427?v=4)](https://github.com/navagroup "navagroup (5 commits)")

---

Tags

yii2multi-languagemulti phrase language

### Embed Badge

![Health badge](/badges/phuongdev89-yii2-multi-language/health.svg)

```
[![Health](https://phpackages.com/badges/phuongdev89-yii2-multi-language/health.svg)](https://phpackages.com/packages/phuongdev89-yii2-multi-language)
```

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