peterkahl/country-to-locale

Converts country code to locale code.

v0.2.1 2018-03-22 14:43 UTC

README

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'