PHPackages                             softedge/yii2-countries - 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. softedge/yii2-countries

ActiveYii2-extension

softedge/yii2-countries
=======================

Model and migration to add countries to your yii2 app

1.1.0(6y ago)03MITPHPPHP &gt;=7.0.0

Since Oct 22Pushed 6y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Yii2 Countries
==============

[](#yii2-countries)

1. Introduction

---

**Yii2 Countries** --- Multilingual extension for the Yii2 framework, which provides a list of all countries and their demonym, plus a migration file and an AR model.

- Requires `agroxy/yii2-multilingual` ([Github](https://github.com/agroxy/yii2-multilingual))
- Multilanguage support

2. Dependencies

---

- php &gt;= 7.0
- composer
- MySql &gt;= 5.5
- agroxy/yii2-multilingual

3. Installation

---

Via composer:

`composer require "softedge/yii2-countries": "^1.1.0"`

or add the following in section **require** of composer.json:

```
"require": {
    "softedge/yii2-countries": "^1.1.0"
}

```

and run command `composer install`,

or command `composer update`, if all yii2 project extensions are already installed.

4. Usage

---

### Main properties

[](#main-properties)

The **namespace** for classes: `slayvin\countries`.

### Application config

[](#application-config)

To add the tables to the database, run the provided migration:

```
'controllerMap' => [
        'migrate' => [
            'class' => yii\console\controllers\MigrateController::class,
            'migrationNamespaces' => [
                'slayvin\countries\migrations'
            ],
        ]
    ],
```

If you need multilingual support, add the languages in your app config params:

```
...
'languages' => ['en',...]
...
```

### Database tables

[](#database-tables)

Country table "countries"

isoselectabledefaultAD00AE00.........ZW00Translation table "countries\_lang"

country\_isolanguagenamedemonymADenAndorraAndorranAEenUnited Arab EmiratesEmirati............ZWfrZimbabweZimbabwéen-neHere, we have:

- non-multilingual fields: **iso**, **selectable**, **default**
- multilingual fields: **name**, **demonym**

License
-------

[](#license)

Licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2391d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

countriesyii2extensionyii 2

### Embed Badge

![Health badge](/badges/softedge-yii2-countries/health.svg)

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

PHPackages © 2026

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