-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: deprecate i18n.getAcceptLanguages
#107
Comments
i18n.getAcceptLanguages
i18n.getAcceptLanguages
After doing additional tests, I found the following: If using If overwriting the value of If overwriting the value of This all confirms the equivalence between |
Chrome is trying Intent to Experiment: Reduce Accept-Language Origin Trial. It will cause |
@hanguokai that is a very valid point. I have opened an issue in the relevant github repository to further discuss this: For now it seems best to keep the |
In Safari, Considering this and previous discussions it is best to keep |
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 deprecatei18n.getAcceptLanguages
.One could consider keeping this as it could still be useful in the potentially required
service_worker
background script. Howevernavigator.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
The text was updated successfully, but these errors were encountered: