peterkahl/country-to-locale

This package is abandoned and no longer maintained. No replacement package was suggested.

Converts country code to locale code.

v1.0.1 2020-09-24 07:45 UTC

This package is auto-updated.

Last update: 2021-01-02 17:56:57 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 country code.

Usage

use peterkahl\locale\locale;

echo locale::country2locale('hk')."\n";
echo locale::country2locale('DE')."\n";
echo locale::country2locale('gb')."\n";

/* Prints:
zh_HK,en_HK
de_DE
en_GB,ga_GB,cy_GB,gd_GB,kw_GB
*/