Is it possible to localize HTTP headers?

An Accept HTTP header can indicate priority using the q qualifier, for example

 application/xml;q=0.8 

I looked in the RFC, but saw any mention of whether the q qualifier is a localization object or not. For example, can a European browser send a digit like q=0,8 if Accept-Language were installed?

If not, there should be some kind of documentation somewhere that indicates that HTTP uses period notation and is culture invariant in its headers, I think?

+4
source share
2 answers

Section 3.9 of RFC-2616 (HTTP / 1.1) defines the quality value (the value assigned by "q" in your example) as:

 qvalue = ( "0" [ "." 0*3DIGIT ] ) | ( "1" [ "." 0*3("0") ] ) 

therefore, all HTTP applications should use a decimal point, not a comma or anything else, no matter where they are in the world.

+3
source

The technical protocol is always culturally independent - it is technical, not American or anything else. Of course, you cannot localize anything in the HTTP header. You also cannot localize the header fields by translating them into the language that it uses in the country in which the browser is launched or written.

+1
source

Source: https://habr.com/ru/post/1391656/


All Articles