简体   繁体   中英

Can't change language to 'zh-CN' in android?

i console the

console.log(Intl.DateTimeFormat.supportedLocalesOf(['zh-cn', 'zh-tw', 'zh']));

and shows

['zh-CN', 'zh-TW', 'zh']

however, when I set the locale of react-calendar to 'zh' , the language is still English?

update: when I didn't set the 'locale' of react-calendar and console the default language of the browser by executing navigator.language the console is

zh-CN

however, the language is still English?

update: i check the arial-label attribute of <adbr></adbr> and found it is Tue Nov 30 2021 15:27:54 GMT+0800 (CST) which is strange since it is 2021年8月5日on PC. And i console the locale in formatDay function, the console is 'zh-CN' .

I check carefully and found it is the problem of browser of THE APP self, not the problem of the react-calendar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM