4 ms·
> There really needs to be some way for language preferences to include quality in some way. In theory, there is. It's called content negotiation. With your br
by maweki 3y ago
> There really needs to be some way for language preferences to include quality in some way.
In theory, there is. It's called content negotiation. With your browser request you already send a list of preferred languages, like "Accept-Language: da, en-gb;q=0.8, en;q=0.7". RFC9110 states that such a quality/weight is assigned to different representations of a resource.
So all the server needs to do is multiply their quality with your preference and return the one with the highest value.
So the technology for that is already in place. It just isn't done.
See: https://www.w3.org/International/questions/qa-lang-priorities https://www.w3.org/International/questions/qa-lang-prioritie...
- derefr 3y agoI think what the GP is describing isn't about client-server negotiation, though, but rather something that happens purely client-side for already-delivered resources, within e.g. the system for loading the right subtitle track embedded into a playing video. AFAIK, there's no standard for allowing client-side media-playback frameworks to probe language preferences with quality values out of the browser they're running in. The navigator.languages property (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages https://developer.mozilla.org/en-US/docs/Web/API/Navigator/l...) doesn't expose qvalues for some reason. And even if there was, there's no way, in any media container format I know of, of annotating subtitle tracks with quality values — so there's no way of saying that a given track really sucks and should be deprioritized relative to the user's preference ordering, but still used if there's no other choice.