Chrome browser - navigator.language doesn't return country code

删除回忆录丶 提交于 2019-12-22 11:20:45

问题


Since last few months I got the problem to detect countryCode from window.navigator.language. My current language on chrome is French(Switzerland)

Currently it return only the language:

window.navigator.language: fr

It was return language-contryCode:

window.navigator.languge: fr-ch

I did a lot of try but currently I cannot detect it from chrome browser. Do you have any idea to solve this problem ? updated: This is my current setting: And here is the result from chrome: Hope I will get some help. Thank you


回答1:


It seems to be a bug, and it has been reported to chromium

navigator.language result differs between english and other languages



来源:https://stackoverflow.com/questions/48223412/chrome-browser-navigator-language-doesnt-return-country-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!