Documentation: Chrome i18n API
A promise-based wrapper for the Chrome i18n API.
- detectI18Language(text)
- getI18nAcceptLanguages()
- getI18nUILanguage()
- getI18nMessage(key)
- getDefaultLanguage()
detectI18Language(text: string): Promise<chrome.i18n.LanguageDetectionResult>
Detects the primary language of the provided text.
getI18nAcceptLanguages(): Promise<string[]>
Retrieves the user's preferred accept languages list.
getI18nUILanguage(): string | undefined
Returns the browser's UI language code.
getI18nMessage(key: string): string | undefined
Retrieves the localized message for the specified key.
getDefaultLanguage(): string | undefined
Extracts the default locale as declared in the extension manifest.