Skip to content

elementLanguage

elementLanguage(element): string | undefined

Defined in: packages/core/src/i18n/strings.ts:202

The language an element is in: its nearest lang attribute (on the element, an ancestor such as <ml-map lang>, or <html lang>), or undefined when none is set — the browser’s own language then applies. Numbers are formatted for it unless a format names its own locale. en_US is read as en-US (normalizeLocale).

ParameterType
elementElement | null | undefined

string | undefined