sdieunidou/country-to-locale

Converts country code to locale code.

v0.2.1 2021-02-11 09:36 UTC

This package is auto-updated.

Last update: 2024-10-11 18:26:30 UTC


README

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'