globalization.js
1.75 KB
-
Fix inconsistant language codes of cldr and moment for Chinese · 2e21c59c
The Chinese language codes have many variants, and different components may use different values. For example, DJANGO < 1.7 and moment uses 'zh-cn' && 'zh-tw' for Simplified Chinese and Traditional Chinese, while CLDR uses 'zh' && 'zh-hant' and DJANGO >= 1.7 uses 'zh-hans' && 'zh-hant'. In current dashboard, dates in tables are always displayed in English on a Chinese language settings, because the fixed language code 'zh' does not match the value 'zh-cn' used in moment. This fix corrects the things and it will adapt further situations because all the variants of Chinese language codes are considered.
louyihua committed