diff --git a/doc/api/globals.md b/doc/api/globals.md index 0ca27111db49e1..07acad04a5c0b4 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -629,6 +629,40 @@ logical processors available to the current Node.js instance. console.log(`This process is running on ${navigator.hardwareConcurrency}`); ``` +### `navigator.language` + + + +* {string} + +The `navigator.language` read-only property returns a string representing the +preferred language of the Node.js instance. + +The value is representing the language version as defined in RFC <5646>. +Examples of valid language codes include "en", "en-US", "fr", "fr-FR", "es-ES", +etc. + +```js +console.log(`The preferred language of the Node.js instance has the tag '${navigator.language}'`); +``` + +### `navigator.languages` + + + +* {string} + +The `navigator.language` read-only property returns a string representing the +preferred language of the Node.js instance. + +```js +console.log(`The preferred language has the tag '${navigator.language}'`); +``` + ## `PerformanceEntry`