Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/i18n/getuilanguage/index.md
6581 views
------{{AddonSidebar()}}
Gets the UI language of the browser. This is different from {{WebExtAPIRef('i18n.getAcceptLanguages')}} which returns the preferred user languages.
See the Internationalization page for a guide on using this function.
Syntax
Parameters
None.
Return value
string. The browser UI language code as an {{WebExtAPIRef("i18n.LanguageCode")}}.
Browser compatibility
{{Compat}}
Examples
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.i18nAPI. This documentation is derived fromi18n.jsonin the Chromium code.