The “Accepted-Language” header include priority for the language in it. All redirection or locale detection should respect the priority specified there.
For example, when provided with this “Accepted-Language
” header:
zh-HK,zh-TW;q=0.8,en-US;q=0.5,en;q=0.3"
a website should:
- find “
zh-HK
” (Traditional Chinese, Hong Kong) and “zh-TW
” (Traditional Chinese, Taiwan) first. If exists, redirect / show the content in that language. - If not exists, find “
en-US
”. redirect / show the content in that language. - If not exists, find “
en
”. redirect / show the content in that language.
However, if you supply a request to addons.mozilla.org/firefox with the said header, it will redirect you to addons.mozilla.org/zh-CN/firefox. That is not an expected response. It is wrong in multiple levels:
- Even there is no “
zh-HK
” in the site, there is “zh-TW
”. From language priority, it should be shown. - “
zh-CN
” is never a part of the language preference. If should not be shown, or it should be shown as a fallback only if both “zh-HK
” and “zh-TW
” are absent. - Event without language priority to “
zh-TW
”, the fallback to “zh-HK
” should always be “zh-TW
” (both Traditional Chinese).
Please fix this redirection issue. Thanks.