peterkahl/country-to-locale

此包已废弃,不再维护。未建议替代包。

将国家代码转换为区域代码。

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.

根据国家代码确定区域。

使用方法

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
*/