Web features explorer

Language

Widely available since 2018-01-29
Tags: api

The navigator.language read-only property returns a string representing the preferred language of the user, usually the language of the browser UI. The navigator.languages read-only property returns an array of strings representing the user's preferred languages.

Learning resources on MDN

Browser support