PHPackages                             emma/internationalization - 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. emma/internationalization

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

emma/internationalization
=========================

A PHP 7.0+ internationalization library and services for getting all the world countries, country states, country's currency/currencies, symbols, locale and languages. It also includes: number formatter, decimal formatter and currency formatter. currency formatter by country name, isoAlphaCode2 or isoAlphaCode3.

v1.0.1(3y ago)0521GPL-2.0-onlyPHPPHP &gt;=7.0

Since May 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/debascoguy/intlCountries)[ Packagist](https://packagist.org/packages/emma/internationalization)[ RSS](/packages/emma-internationalization/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (1)

intlCountries
=============

[](#intlcountries)

A PHP 7.0+ internationalization library and services for getting all the

- world countries,
- country states,
- country's currency/currencies,
- symbols, locale and
- languages.

It also includes:

- Number Formatter,
- Decimal Formatter and
- Currency Formatter : currency formatter by country name, isoAlphaCode2 or isoAlphaCode3.

I am not going to bore you with lots of write-up to justify why you should or should not use this library as I strongly believe nobody says no to problem solving tools. So, here are the example as it can be used to solve internationalization problems:

```
use Emma\Countries\Countries;

//VERY IMPORTANT - All function that returns an object also has there corresponding function that returns an array data set.

/**
* GET ALL
*/
//Get all - COUNTRIES
$countries = Countries::getCountryRepository()->findAllCountry();

//Get all - CURRENCIES - countries and there currency(s) information
$currencies = Countries::getCurrencyRepository()->findAllCountryAndCurrency();

//Get all - LANGUAGE - locales of all countries. Data incliudes: isoAlphaCode2, isoAlphaCode3, locales, defaultLocale, language of countries.
$locales = Countries::getLocaleRepository()->findAllLocales();

/**
* FIND SOMETHING SPECIFIC
*/
//Get a particular country locales information - By countryName OR country isoAlphaCode2 OR country isoAlphaCode2.
$countryNameORisoAlphaCode2ORisoAlphaCode2 = 'US'; //OR USD OR United States of America
$countryLocales = Countries::getLocaleRepository()->findLocale(string $countryNameORisoAlphaCode2ORisoAlphaCode2)

//Get a particular country information - By countryName OR country isoAlphaCode2 OR country isoAlphaCode2.
//Data includes: name, all states in that country, currencies, default_country of that country, etc...
$countryNameORisoAlphaCode2ORisoAlphaCode2 = 'US'; //OR USD OR United States of America
$countryInformation = (Countries::getCountryRepository()->findCountry($countryNameORisoAlphaCode2ORisoAlphaCode2));

//Get a particular country currency detailed information. For example:
$code = 'NGN';
$currency = (Countries::getCurrencyRepository()->findCurrencyDetails($code));

/**
* FORMATTERS
*/
//Format Currency using countryName OR country isoAlphaCode2 OR country isoAlphaCode2
echo $formatedAmount = Countries::formatCurrencyByCountry(5.0, 'NG');
echo $formatedAmount = Countries::formatCurrencyByCountry(5.0, 'NGA');
echo $formatedAmount = Countries::formatCurrencyByCountry(5.0, 'Nigeria');

//Similarly format Decimal Number By countryName OR country isoAlphaCode2 OR country isoAlphaCode2
echo $formatedAmount = Countries::formatDecimalByCountry(5.0, 'NG');
echo $formatedAmount = Countries::formatDecimalByCountry(5.0, 'NGA');
echo $formatedAmount = Countries::formatDecimalByCountry(5.0, 'Nigeria');

//VERY IMPORTANT - All function that returns an object also has there corresponding function that returns an array data set.
```

If you check the `Countries` class, there are lots functions you can use for so many different internationalization. The example above are a few of how useful this library is to you. :)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

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

Every ~3 days

Total

2

Last Release

1132d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17ecf1e99357556e97438ed0d7edbabada5380ff58e4a6a49cda3521f5a15637?d=identicon)[debascoguy](/maintainers/debascoguy)

---

Top Contributors

[![debascoguy](https://avatars.githubusercontent.com/u/12888833?v=4)](https://github.com/debascoguy "debascoguy (3 commits)")

### Embed Badge

![Health badge](/badges/emma-internationalization/health.svg)

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

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