Page or text language.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 27 May 2016 11:05:54 +0300
changeset 1966 5f7b046c246e
parent 1965 2ddf10980e8f
child 1967 e852e900a724
Page or text language.
html.rst
--- a/html.rst	Wed May 25 22:08:56 2016 +0300
+++ b/html.rst	Fri May 27 11:05:54 2016 +0300
@@ -12,8 +12,8 @@
 
   <!DOCTYPE HTML>
 
-Page encoding.
-==============
+Page encoding
+=============
 
 Place in HEAD tag (CHARSET is one among of defined by
 http://www.iana.org/assignments/character-sets)::
@@ -28,6 +28,25 @@
 
   http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2
 
+Page or text language
+=====================
+
+Client may suggest preferred language to server via ``Accept-Language`` HTTP
+tag::
+
+  Accept-Language: da, en-gb;q=0.8, en;q=0.7
+
+W3C best practice suggest to surround corresponding text pieces in tag with
+``lang`` attribute. Attribute values are from BCP 47.
+
+http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
+  IANA registered language and country codes. Coherent with ISO codes but
+  frequently updates.
+http://www.ietf.org/rfc/bcp/bcp47.txt
+  Tags for Identifying Languages (Best Current Practice).
+https://www.w3.org/International/articles/language-tags/
+  Language tags in HTML and XML.
+
 Center an object.
 =================