PHPackages                             diegoarreola/country-code-language-list - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. diegoarreola/country-code-language-list

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

diegoarreola/country-code-language-list
=======================================

List of names, languages, and codes of all countries.

1.0.x-dev(2y ago)01MITPHPPHP &gt;=7.4

Since Dec 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/DiiegoAG/country-code-language-list)[ Packagist](https://packagist.org/packages/diegoarreola/country-code-language-list)[ Docs](https://github.com/DiiegoAG/country-code-language-list)[ RSS](/packages/diegoarreola-country-code-language-list/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Country Code Language List
==========================

[](#country-code-language-list)

[![lphp](https://private-user-images.githubusercontent.com/45045082/290350054-fac80572-8021-44a2-ad5d-200c98e37d59.jpeg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIzNjg1MTksIm5iZiI6MTc4MjM2ODIxOSwicGF0aCI6Ii80NTA0NTA4Mi8yOTAzNTAwNTQtZmFjODA1NzItODAyMS00NGEyLWFkNWQtMjAwYzk4ZTM3ZDU5LmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyNVQwNjE2NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYzc5N2YwZDY1NGE1Mjg5NDIxYWZiY2Q4OGZlNDJkMDcyM2Y4N2JiODQ3OWMwMGUxMzE0MzQxZjk3M2ZhZWZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZqcGVnIn0.v-wYy5JJ6HmMzO1KmurWE0qut7jOvT_Lr2TBzGTbOXc)](https://private-user-images.githubusercontent.com/45045082/290350054-fac80572-8021-44a2-ad5d-200c98e37d59.jpeg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODIzNjg1MTksIm5iZiI6MTc4MjM2ODIxOSwicGF0aCI6Ii80NTA0NTA4Mi8yOTAzNTAwNTQtZmFjODA1NzItODAyMS00NGEyLWFkNWQtMjAwYzk4ZTM3ZDU5LmpwZWc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYyNVQwNjE2NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYzc5N2YwZDY1NGE1Mjg5NDIxYWZiY2Q4OGZlNDJkMDcyM2Y4N2JiODQ3OWMwMGUxMzE0MzQxZjk3M2ZhZWZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZqcGVnIn0.v-wYy5JJ6HmMzO1KmurWE0qut7jOvT_Lr2TBzGTbOXc)

Library with country's name, language, two-language-code and three-language-code

This library contains valid ISO Language Code lower-case two-letter codes as defined by ISO-639, upper-case two-letter codes as defined by ISO-3166.

### Example of data

[](#example-of-data)

  CountryLanguageTwo LetterThree Letter Number (LCID) MexicoSpanishes-MXes-MEX2058 United StatesEnglish (United States)en-USen-USA4096 ChileSpanishes-CLes-CHL13322 **If you want to watch all countries and codes, you can [click here](https://www.fincher.org/Utilities/CountryLanguageList.shtml)**

### Requeriments

[](#requeriments)

php &gt;= 7.4 and Laravel &gt;= 8.0

### How to install

[](#how-to-install)

```
composer require diegoarreola/country-code-language-list

```

How to use
----------

[](#how-to-use)

### Use library

[](#use-library)

```
use Diegoarreola\CountryCodeLanguageList\CCLL;
```

### Search country information by different methods

[](#search-country-information-by-different-methods)

```
$CCLL = new CCLL();

$CCLL->searchByName('Mexico');
/* It returns: */
[
  [
    "name":"Mexico",
    "language":"English",
    "two_letter_code":"en-MX",
    "three_letter_code":"en-MEX",
    "locale_id":"4096"
  ],
  [
    "name":"Mexico",
    "language":"Spanish",
    "two_letter_code":"es-MX",
    "three_letter_code":"es-MEX",
    "locale_id":"2058"
  ]
]

$CCLL->searchByLanguage('English');
/* it returns */
[
  [
    "name" => "Albania",
    "language" => "English",
    "two_letter_code" => "en-AL",
    "three_letter_code" => "en-ALB",
    "locale_id" => "4096"
  ],
  [
    "name" => "American Samoa",
    "language" => "English",
    "two_letter_code" => "en-AS",
    "three_letter_code" => "en-ASM",
    "locale_id" => "4096"
  ],
  [
    "name" => "Andorra",
    "language" => "English",
    "two_letter_code" => "en-AD",
    "three_letter_code" => "en-AND",
    "locale_id" => "4096"
  ],
]

$CCLL->searchBy2LC('es-MX');
/* it returns */
[
  [
    "name":"Mexico",
    "language":"Spanish",
    "two_letter_code":"es-MX",
    "three_letter_code":"es-MEX",
    "locale_id":"2058"
  ]
]

$CCLL->searchBy3LC('es-MEX');
/* it returns */
[
  [
    "name":"Mexico",
    "language":"Spanish",
    "two_letter_code":"es-MX",
    "three_letter_code":"es-MEX",
    "locale_id":"2058"
  ]
]
```

### Params

[](#params)

```
$CCLL->searchByName(); // => English country name (String), could be lowercase or uppercase like 'United Kingdom' or 'united kingdom'.

$CCLL->searchByLanguage(); // => English language (String), could be lowercase or uppercase like 'Spanish' or 'spanish'.

$CCLL->searchBy2LC(); // => English two language code (String), could be lowercase or uppercase like 'es_MX', 'es_mx', 'ES-MX', 'es-mx'. You can use '-' or '_'.

$CCLL->searchBy3LC(); // => Same method before you can use '-' or '_', uppercase or lowercase.
```

### Contributions

[](#contributions)

You can open a pull request if you consider that change can be useful or it can resolve a bug.

### License

[](#license)

Open source software with MIT license.

---

Author: Diego Alberto Arreola Galván. 🇲🇽

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 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

925d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90c0f2162ecd04bbb9ac0c792958b4cfd91744794211e0e2252460312bdd0a18?d=identicon)[DiiegoAG](/maintainers/DiiegoAG)

---

Top Contributors

[![DiiegoAG](https://avatars.githubusercontent.com/u/45045082?v=4)](https://github.com/DiiegoAG "DiiegoAG (17 commits)")

---

Tags

languagescountrieslistnamescodes

### Embed Badge

![Health badge](/badges/diegoarreola-country-code-language-list/health.svg)

```
[![Health](https://phpackages.com/badges/diegoarreola-country-code-language-list/health.svg)](https://phpackages.com/packages/diegoarreola-country-code-language-list)
```

###  Alternatives

[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.8M58](/packages/rinvex-countries)[phpcollection/phpcollection

General-Purpose Collection Library for PHP

96864.5M34](/packages/phpcollection-phpcollection)[league/iso3166

ISO 3166-1 PHP Library

69837.6M135](/packages/league-iso3166)[pragmarx/countries

PHP Countries and Currencies

1.9k3.4M22](/packages/pragmarx-countries)[webpatser/laravel-countries

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, capital and more for all countries. Compatible with Laravel 11.x, 12.x, and 13.x.

8402.8M9](/packages/webpatser-laravel-countries)[juanparati/iso-codes

A PHP library that provides ISO codes, currencies, languages, timezones and additional geopolitical information

17164.7k](/packages/juanparati-iso-codes)

PHPackages © 2026

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