本文介绍了Chrome浏览器 - navigator.language不会返回国家/地区代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自上个月以来
我遇到了从window.navigator.language检测countryCode的问题。我目前在chrome上的语言是法语(瑞士)

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

目前只返回语言:

window.navigator.language: fr

返回language-contryCode:

It was return language-contryCode:

window.navigator.languge: fr-ch

我做了很多尝试,但目前我无法从Chrome浏览器中检测到它。
你有什么想法解决这个问题吗?
更新:这是我目前的设置:

以下是chrome的结果:

希望我会得到一些帮助。谢谢

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

推荐答案

这似乎是一个错误,并且已报告为铬

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

这篇关于Chrome浏览器 - navigator.language不会返回国家/地区代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:58