PHPackages                             donsi/iso3166 - 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. donsi/iso3166

ActiveLibrary[Localization &amp; i18n](/categories/localization)

donsi/iso3166
=============

ISO 3166-1 PHP Library with multiple languages

2.1.6(5y ago)0179MITPHPPHP ^7.0

Since Jun 30Pushed 5y agoCompare

[ Source](https://github.com/simeonackermann/iso3166)[ Packagist](https://packagist.org/packages/donsi/iso3166)[ Docs](https://github.com/simeonackermann/iso3166)[ RSS](/packages/donsi-iso3166/feed)WikiDiscussions master Synced 5d ago

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

ISO3166 multi language
======================

[](#iso3166-multi-language)

Fork of [thephpleague/iso3166](https://github.com/thephpleague/iso3166) PHP library providing ISO 3166-1 country data with support of multiple languages.

Currently supported languages: English, German, France, Russian, Arabic

Installing
----------

[](#installing)

```
$ composer require donsi/iso3166
```

Using
-----

[](#using)

Quick guide with custom language:

```
$ISO3166 = new Donsi\ISO3166\ISO3166;
$ISO3166->setLanguage('de');
$data = $ISO3166->alpha3('nld');
```

Data sample:

```
[
    'name' => 'Niederlande',
    'alpha2' => 'NL',
    'alpha3' => 'NLD',
    'numeric' => '528'
]
```

All available languages:

```
// en, de, fr, ru, ar, ...
$languages = (new Donsi\ISO3166\ISO3166)->getLanguages();
```

You still can use all methods with default language:

```
$data = (new Donsi\ISO3166\ISO3166)->name($name);
$data = (new Donsi\ISO3166\ISO3166)->alpha2($alpha2);
$data = (new Donsi\ISO3166\ISO3166)->alpha3($alpha3);
$data = (new Donsi\ISO3166\ISO3166)->numeric($numeric);
```

The currency (part of the origin library) is currently not available.

See also [iso3166.thephpleague.com/using](https://iso3166.thephpleague.com/using) section of the origin documentation.

Data
----

[](#data)

The country data is based on [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1), gathered and shaped from [stefangabos/world\_countries](https://github.com/stefangabos/world_countries/).

What is ISO 3166-1
------------------

[](#what-is-iso-3166-1)

> ISO 3166-1 is part of the ISO 3166 standard published by the International Organization for Standardization (ISO), and defines codes for the names of countries, dependent territories, and special areas of geographical interest. The official name of the standard is Codes for the representation of names of countries and their subdivisions – Part 1: Country codes. It defines three sets of country codes:
>
> - ISO 3166-1 alpha-2 – two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).
> - ISO 3166-1 alpha-3 – three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes.
> - ISO 3166-1 numeric – three-digit country codes which are identical to those developed and maintained by the United Nations Statistics Division, with the advantage of script (writing system) independence, and hence useful for people or systems using non-Latin scripts.
>
> *-- [Wikipedia](http://en.wikipedia.org/wiki/ISO_3166-1)*

Contributing
------------

[](#contributing)

Feel free to submit a pull request or create an issue.

License
-------

[](#license)

donsi/iso3166 is licensed under the MIT license.

Source(s)
---------

[](#sources)

- [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) by [Wikipedia](http://www.wikipedia.org) licensed under [CC BY-SA 3.0 Unported License](http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License)
- [www.iso.org](http://www.iso.org)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 72.1% 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 ~135 days

Recently: every ~126 days

Total

12

Last Release

2117d ago

Major Versions

1.x-dev → 2.0.02017-05-11

PHP version history (3 changes)1.0.0PHP ^5.5 || ^7.0

2.0.0PHP ^5.6 || ^7.0

2.1.2PHP ^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/604590?v=4)[donsi](/maintainers/donsi)[@donsi](https://github.com/donsi)

---

Top Contributors

[![alcohol](https://avatars.githubusercontent.com/u/21414?v=4)](https://github.com/alcohol "alcohol (62 commits)")[![simeonackermann](https://avatars.githubusercontent.com/u/6428217?v=4)](https://github.com/simeonackermann "simeonackermann (13 commits)")[![markitosgv](https://avatars.githubusercontent.com/u/1706470?v=4)](https://github.com/markitosgv "markitosgv (2 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (2 commits)")[![einenlum](https://avatars.githubusercontent.com/u/5675200?v=4)](https://github.com/einenlum "einenlum (1 commits)")[![fulldecent](https://avatars.githubusercontent.com/u/382183?v=4)](https://github.com/fulldecent "fulldecent (1 commits)")[![nikolaposa](https://avatars.githubusercontent.com/u/6012807?v=4)](https://github.com/nikolaposa "nikolaposa (1 commits)")[![npispas](https://avatars.githubusercontent.com/u/22989333?v=4)](https://github.com/npispas "npispas (1 commits)")[![drcreazy](https://avatars.githubusercontent.com/u/3186282?v=4)](https://github.com/drcreazy "drcreazy (1 commits)")[![arubacao](https://avatars.githubusercontent.com/u/7462542?v=4)](https://github.com/arubacao "arubacao (1 commits)")[![duncan3dc](https://avatars.githubusercontent.com/u/546811?v=4)](https://github.com/duncan3dc "duncan3dc (1 commits)")

---

Tags

languageslibrarycountriesISO 3166iso31663166-1multi

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/donsi-iso3166/health.svg)

```
[![Health](https://phpackages.com/badges/donsi-iso3166/health.svg)](https://phpackages.com/packages/donsi-iso3166)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[laravel-lang/lang

List of 126 languages for Laravel Framework, Laravel Jetstream, Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova, Laravel Spark and Laravel UI

7.8k9.5M40](/packages/laravel-lang-lang)[nnjeim/world

Laravel countries, states, cities, currencies, languages and IP geolocation

970361.2k3](/packages/nnjeim-world)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[aternus/geonames-client

GeoNames API Client

39215.5k2](/packages/aternus-geonames-client)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)

PHPackages © 2026

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