fawno / un-m49
Standard country or area codes for statistical use (M49)
1.0.0
2025-01-20 08:57 UTC
Requires
- php: >=7.4.0
README
Standard country or area codes for statistical use (M49)
Requirements
- PHP >= 7.4.0
Installation
You can install this plugin into your application using composer:
composer require fawno/un-m49
Usage
use UN\M49\English\ISOalpha3Names as ISOalpha3NamesEnglish; use UN\M49\Spanish\ISOalpha3Names as ISOalpha3NamesSpanish; use UN\M49\French\ISOalpha3Names as ISOalpha3NamesFrench; use UN\M49\Russian\ISOalpha3Names as ISOalpha3NamesRussian; use UN\M49\Chinese\ISOalpha3Names as ISOalpha3NamesChinese; use UN\M49\Arabic\ISOalpha3Names as ISOalpha3NamesArabic; use UN\M49\ISOalpha3; // Get ISO-alpha3 code from M49 code echo ISOalpha3::fromM49(724), PHP_EOL; // Get English name from M49 code echo ISOalpha3NamesEnglish::fromM49(724), PHP_EOL; // Get Spanish name from M49 code echo ISOalpha3NamesSpanish::fromM49(724), PHP_EOL; // Get French name from M49 code echo ISOalpha3NamesFrench::fromM49(724), PHP_EOL; // Get Russian name from M49 code echo ISOalpha3NamesRussian::fromM49(724), PHP_EOL; // Get Chinese name from M49 code echo ISOalpha3NamesChinese::fromM49(724), PHP_EOL; // Get Arabic name from M49 code echo ISOalpha3NamesArabic::fromM49(724), PHP_EOL;