Open leftstick opened 4 years ago
Copied from https://github.com/umijs/umi/issues/4520.
Right now, we only support {lang}-{country} format, but browser give us more via navigator.language, it might be zh-Hans-CN, or just zh
{lang}-{country}
navigator.language
zh-Hans-CN
zh
We may use library like subtag to parse the language tag we retrieved via navigator.language
Copied from https://github.com/umijs/umi/issues/4520.
Right now, we only support
{lang}-{country}
format, but browser give us more vianavigator.language
, it might bezh-Hans-CN
, or justzh