现在的位置: 首页 > 综合 > 正文

关于web文档的语言

2018年05月22日 ⁄ 综合 ⁄ 共 622字 ⁄ 字号 评论关闭

https://www.w3.org/International/getting-started/language.en

https://www.w3.org/International/questions/qa-html-language-declarations

http://www.w3.org/blog/International/category/articles/

http://stackoverflow.com/questions/4436541/whats-the-difference-between-the-lang-attribute-and-the-meta-http-equiv-conte/4436639#4436639

lang的使用是标记文档内容的语言,其作用是为一些语言敏感的工具服务。比如,chrome浏览器的翻译功能,如果检测到lang的设定,会询问是否翻译文档。

lang的设定还可以应用于css,见http://www.w3.org/International/questions/qa-css-lang

meta或者header里content language的设定,则用于标识目标用户的语言。比如一个文档是为了中国人学法语,那么lang会设置为fr,但是header的Content-Language会是zh。

深入理解要看官方的文档http://www.w3.org/blog/International/

【上篇】
【下篇】

抱歉!评论已关闭.