[i18n-drafts] [questions/qa-when-lang-neg] Language negotiation using client-side JavaScript (#545)

xfq has just created a new issue for https://github.com/w3c/i18n-drafts:

== [questions/qa-when-lang-neg]  Language negotiation using client-side JavaScript ==
[source] (https://www.w3.org/International/questions/qa-when-lang-neg.en.html) [en]

> Language negotiation is a function of the HTTP protocol which lets a server choose among several language versions of a page, based on the URL and on preference information sent by the browser (specifically in the `Accept-Language` header). This is distinct from page selection based on the IP address of the browser or from a manual selection by the user on a language-selection page.

In addition to the HTTP functions mentioned above, I think there's another language negotiation approach, which is [navigator.languages](https://html.spec.whatwg.org/multipage/system-state.html#language-preferences). The advantage of this approach is that it does not require server-side support. The disadvantage is that it can only be used with JavaScript enabled.

We can mention it in this article, at least briefly.

Please view or discuss this issue at https://github.com/w3c/i18n-drafts/issues/545 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 30 September 2023 03:52:44 UTC