The i18n API allows you to manipulate the i18n related browser settings, such as the accept languages. (Note: since the first version will only implement the access of accept languages, this document will focus on accept languages below.)
It allows extensions to read and write the browser's i18n related settings. Given accept languages as an example, page translation extension and dictionary extension will need to get the accept languages from the browser and use them as the targeted languages for page or word translation.
Given accept languages as an example, read accept languages could be part of the web platform, it could be exposed by window.navigator.acceptLanguages while UI language is exposed through widow.navigator.language. But we would also like to be able to modify accept languages preferences as well by extension, for example, it'd be nice if we could "learn" the accept-languages through translate, such as if you decline to translate a French page, that would be a good signal that you want it added to the accept-languages.
Read accept languages should be OK.
The first version will only implement the access of accept languages.
- Any issues with modifying the browser's accept languages through extension API?