Currently you can get a list of accepted languages using the i18n.getAcceptLanguages method. This returns an array with the languages found in Accept-Language headers. See MDN doc and Cr doc.
Since the introduction of this API, the web now provides the same using the navigator.languages property. As it seems we want to favor web technologies instead of also providing a webExtension API, I suggest to deprecate i18n.getAcceptLanguages.
One could consider keeping this as it could still be useful in the potentially required service_worker background script. However navigator.languages is now also available in serviceworkers. See MDN doc.
Related issues:
https://bugs.chromium.org/p/chromium/issues/detail?id=101138
https://bugs.chromium.org/p/chromium/issues/detail?id=1258498
Currently you can get a list of accepted languages using the
i18n.getAcceptLanguagesmethod. This returns an array with the languages found in Accept-Language headers. See MDN doc and Cr doc.Since the introduction of this API, the web now provides the same using the
navigator.languagesproperty. As it seems we want to favor web technologies instead of also providing a webExtension API, I suggest to deprecatei18n.getAcceptLanguages.One could consider keeping this as it could still be useful in the potentially required
service_workerbackground script. Howevernavigator.languagesis now also available in serviceworkers. See MDN doc.Related issues:
https://bugs.chromium.org/p/chromium/issues/detail?id=101138
https://bugs.chromium.org/p/chromium/issues/detail?id=1258498