Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately, that just specifies which languages you prefer, regardless of what the original language is.

I speak Dutch and English, but have English set as my preferred language, because most of the time that multiple languages are available, that is the original language. However, sometimes I'll be visiting a Dutch site that has a (usually badly-)translated English version available, and I'd rather get the Dutch version.



I think thats bad logic on the server side and not to do with the concept of Accept-Language though.

I would think the ideal prioritisation should probably be:

* Exact (en_GB)

* Exact (fr_CA)

* Soft (en_*) // Any variant of English you might have available

* Soft (fr_*) // Any variant of French you might have available

* Translated. (to first preferred)

for Accept-Language: “en_GB,fr_CA”


I don't think Accept-Language supports "Translated", "Exact" or "Soft"? But yes, that would match the language setting that GGP asked for.


This is expressed as the quality parameter. To make the system GP proposed work atop HTTP content-negotiation, a server operator should assign a very small number to the automatically translated content.


Isn't that parameter sent in the Request?

(Also note that I wasn't talking about automatically translated content necessarily. Manually translated content still often is of worse quality than the original language.)


It is; but also there is a server counter-part with its own quality weights. If that does not make sense, play with the code in http://p3rl.org/HTTP::Negotiate and read the HTTP spec.


TIL. Well, then I wish that was widely implemented :)


Isn't that what `Accept-Language: *` is for?

You could probably also trick websites into serving the original language by setting a language they probably don't support (how many websites have a version available in Akkadian anyway?) but you'd need to pick something that the Google Translate widget found on many websites doesn't pick up and try to use.


No, because then it will probably serve it in the original language regardless of the languages I speak. If the original language is French, I'd still prefer to have it in English.

(To be clear, with how widespread English is, and how often Dutch sites are Dutch-only, this is a minor issue - having English, then Dutch as my preference is usually good enough.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: