PHPackages                             ashterix/country-iso - 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. ashterix/country-iso

ActiveLibrary

ashterix/country-iso
====================

Get localized country names from ISO 3166-1 codes

1.0.0(11y ago)0187MITPHPPHP &gt;=5.4

Since Mar 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/Ashterix/iso3166)[ Packagist](https://packagist.org/packages/ashterix/country-iso)[ RSS](/packages/ashterix-country-iso/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

ISO 3166
========

[](#iso-3166)

Get localized country names from ISO 3166-1 codes.

### How use?

[](#how-use)

##### INIT

[](#init)

```
use CountryIso\ISO3166;

$isoCodes = new ISO3166();
~~~~~

##### SET COUNTRIES ALIASES
~~~~~~ php
// Add an alias for the Vatican
$countryCodes->setCountriesAliases([
    'VA' => 'Vatican'
]);
// or add some aliases for the Vatican
$countryCodes->setCountriesAliases([
    'VA' => [
        'Holy See',
        'Vatican',
        'Vatican City State'
    ]
]);
~~~~~

##### GET DATA
Get country name by code:
~~~~~~ php
echo $countryCodes->getCountry("US");  // United States
echo $countryCodes->getCountry("UA");  // Ukraine
echo $countryCodes->getCountry("ES");  // Spain
~~~~~

Get country code by name or aliases:
~~~~~~ php
echo $countryCodes->getCountry("Ukraine");      // UA
echo $countryCodes->getCountry("United States");// US

echo $countryCodes->getCountry("Vatican");      // VA
echo $countryCodes->getCountry("Holy See");     // VA
~~~~~

Get map (all countries array):
~~~~~~ php
$allCountries = $countryCodes->getMap();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

4080d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87aea0bcf81c64ced7c3a14a1746d603ec6e8acfba62ef85746df40e8c376e7f?d=identicon)[Alex Maistrenko](/maintainers/Alex%20Maistrenko)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ashterix-country-iso/health.svg)

```
[![Health](https://phpackages.com/badges/ashterix-country-iso/health.svg)](https://phpackages.com/packages/ashterix-country-iso)
```

PHPackages © 2026

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