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

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

aminbbb92/yii2-multi-language
=============================

This will help multi-language for Yii2

04PHP

Since Sep 15Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#yii2-multi-language)

[![Packagist Version](https://camo.githubusercontent.com/5105bd44a5f7826aa2892a26b8722983a8e17d6f3449ff47b09f387e1d8a1bea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d696e62626239322f796969322d6d756c74692d6c616e67756167652e7376673f7374796c653d666c6174)](https://packagist.org/packages/aminbbb92/yii2-multi-language)[![Total Downloads](https://camo.githubusercontent.com/344ec7561ad43b1656aa57ae110f7cb871d9bff84d5dba95fe7bfd0860ba1c48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616d696e62626239322f796969322d6d756c74692d6c616e67756167652e7376673f7374796c653d666c6174)](https://packagist.org/packages/aminbbb92/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)
- [aminbbb92 Yii 2 Locale Urls](https://packagist.org/packages/aminbbb92/yii2-localeurls)

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

[](#install--config)

### Install

[](#install)

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

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

```

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

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

```

### Config:

[](#config)

```
[php]
    'language'   => 'en', //TODO Change this to 2 characters
    .....................
    'bootstrap'           => [
        'log',
        'multiLanguage',
    ],
    'components' => [
        'multiLanguage' => [
           'class' => '\aminbbb92\language\Component',
        ],
    ],
    'modules'    => [
        'gridview' => [
            'class' => '\kartik\grid\Module',
        ],
        'language' => [
        'class'    => '\aminbbb92\language\Module',
        /*TODO uncommented if you want to custom view*/
        //'viewPath' => '@app/vendor/aminbbb92/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/aminbbb92/yii2-multi-language/src/migrations

```

Usage
-----

[](#usage)

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

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

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

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

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 54.5% 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/dbabd0ec3e2623e2494549ef1c3119b75c03669e3da47b092644ceb11aefa043?d=identicon)[aminbbb92](/maintainers/aminbbb92)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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