An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. For an unknown language, und will be returned, which means that [percentage] of the text is unknown to CLD
Detects the language of the provided text using CLD.
User input string to be translated.
Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined.
The name of the message, as specified in the messages.json file.
Optionalsubstitutions: any
Substitution strings, if the message requires any.
Message localized for current locale.
Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
The browser UI language code such as en-US or fr-FR.
Use the
browser.i18ninfrastructure to implement internationalization across your whole app or extension.