i18n.getAcceptLanguages()

Gets the accept-languages of the browser. This is different from the locale used by the browser. To get the locale, use i18n.getUILanguage.

Syntax

browser.i18n.getAcceptLanguages(
  function(languages) {...} // function
)

Parameters

callback
function. The function is passed the following arguments:
languages
array of i18n.LanguageCode. Array of LanguageCode.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?47.0Yes33
Firefox
Basic support48.0

Examples

Acknowledgements

This API is based on Chromium's chrome.i18n API. This documentation is derived from i18n.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,