Skip to content
Determine locale from 2-letter country code. (Can be used as language code.)
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Autoloader Apr 21, 2017
.gitignore Create .gitignore Mar 22, 2018
LICENSE Initial commit Mar 20, 2017
README.md Update README.md Jan 30, 2019
composer.json Update composer.json Mar 20, 2018

README.md

Country-to-Locale

Downloads Download per Month License If this project has business value for you then don't hesitate to support me with a small donation.

Determine locale from 2-letter country code. (Can be used as language code.)

Usage

use peterkahl\locale\locale;

echo locale::country2locale('DE'); # 'de_DE'

echo locale::country2locale('CN'); # 'zh_CN'
You can’t perform that action at this time.