Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 1.23 KB

File metadata and controls

65 lines (40 loc) · 1.23 KB

i18n

Documentation: Chrome i18n API

A promise-based wrapper for the Chrome i18n API.

Methods


detectI18Language

detectI18Language(text: string): Promise<chrome.i18n.LanguageDetectionResult>

Detects the primary language of the provided text.

getI18nAcceptLanguages

getI18nAcceptLanguages(): Promise<string[]>

Retrieves the user's preferred accept languages list.

getI18nUILanguage

getI18nUILanguage(): string | undefined

Returns the browser's UI language code.

getI18nMessage

getI18nMessage(key: string): string | undefined

Retrieves the localized message for the specified key.

getDefaultLanguage

getDefaultLanguage(): string | undefined

Extracts the default locale as declared in the extension manifest.