| Package Data | |
|---|---|
| Maintainer Username: | matriphe |
| Maintainer Contact: | halo@matriphe.com (Muhammad Zamroni) |
| Package Create Date: | 2015-06-25 |
| Package Last Update: | 2025-10-05 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-02 15:02:16 |
| Package Statistics | |
|---|---|
| Total Downloads: | 2,894,587 |
| Monthly Downloads: | 64,735 |
| Daily Downloads: | 2,129 |
| Total Stars: | 50 |
| Total Watchers: | 2 |
| Total Forks: | 21 |
| Total Open Issues: | 2 |
PHP library to convert ISO-639-1 code to language name, based on Wikipedia's List of ISO 639-1 codes.
Using composer: composer require matriphe/iso-639
<?php
required 'src/ISO639.php';
//required 'vendor/autoload.php'; // If using composer
$iso = new Matriphe\ISO639\ISO639;
// Get language name from ISO-639-1 code
echo $iso->languageByCode1('en'); // English
echo $iso->languageByCode1('id'); // Indonesian
echo $iso->languageByCode1('jv'); // Javanese
// Get native language name from ISO-639-1 code
echo $iso->nativeByCode1('en'); // English
echo $iso->nativeByCode1('id'); // Bahasa Indonesia
echo $iso->nativeByCode1('jv'); // basa Jawa
// Get language name from ISO-639-2t code
echo $iso->languageByCode2t('eng'); // English
echo $iso->languageByCode2t('ind'); // Indonesian
echo $iso->languageByCode2t('jav'); // Javanese
// Get native language name from ISO-639-2t code
echo $iso->nativeByCode2t('eng'); // English
echo $iso->nativeByCode2t('ind'); // Bahasa Indonesia
echo $iso->nativeByCode2t('jav'); // basa Jawa
// Get language name from ISO-639-2b code
echo $iso->languageByCode2b('eng'); // English
echo $iso->languageByCode2b('ind'); // Indonesian
echo $iso->languageByCode2b('jav'); // Javanese
// Get native language name from ISO-639-2b code
echo $iso->nativeByCode2b('eng'); // English
echo $iso->nativeByCode2b('ind'); // Bahasa Indonesia
echo $iso->nativeByCode2b('jav'); // basa Jawa
// Get language name from ISO-639-3 code
echo $iso->languageByCode3('eng'); // English
echo $iso->languageByCode3('ind'); // Indonesian
echo $iso->languageByCode3('jav'); // Javanese
// Get native language name from ISO-639-3 code
echo $iso->nativeByCode3('eng'); // English
echo $iso->nativeByCode3('ind'); // Bahasa Indonesia
echo $iso->nativeByCode3('jav'); // basa Jawa