📅  最后修改于: 2023-12-03 15:03:09.048000             🧑  作者: Mango
The navigator.language
property in JavaScript returns a string representing the language version of the browser.
var language = navigator.language;
console.log(navigator.language); // "en-US"
Here's a list of all the possible language codes you may get with the navigator.language
property:
The navigator.language
property in JavaScript returns a string representing the language version of the browser. It can be used to provide localized content to users.