diff --git a/doc/api/globals.md b/doc/api/globals.md index ebaaf2a6e0012e..e0df462c306452 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -637,6 +637,41 @@ logical processors available to the current Node.js instance. console.log(`This process is running on ${navigator.hardwareConcurrency} logical processors`); ``` + +### `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>. +The default value is `'en-US'`. + +```js +console.log(`The preferred language of the Node.js instance has the tag '${navigator.language}'`); +``` + +### `navigator.languages` + + + +* {Array} + +The `navigator.languages` read-only property returns an array of strings +representing the preferred languages of the Node.js instance. +The default value is `['en-US']`. + +```js +console.log(`The preferred languages are '${navigator.language}'`); +``` + ### `navigator.userAgent`