lang

Is 'en-EU' a valid value for HTML 'lang' attribute?

你。 提交于 2019-11-30 09:29:17
Markup for different editions of my news site... US Edition: <html lang="en-US" xml:lang="en-US"> ... </html> India Edition: <html lang="en-IN" xml:lang="en-IN"> ... </html> Europe Edition (in this case not a specific country, i.e. news covers a broader region): <html lang="en-EU" xml:lang="en-EU"> ... </html> I am depending on the markup of the page to make the target language/region of pages clear to the search engines because the different editions of the news site use a directory-based path (e.g. example.com/eu/ ) rather than a sub-domain ( eu.example.com ) or domain (e.g. example.eu )

html - change language using element.lang

半腔热情 提交于 2019-11-29 06:47:20
First question on stack, so hurray to me! I'm trying to develop a new way (apparently, since I've seen no solution to this online, perhaps cos it's not possible) to change the language of HTML written elements using JS and the lang property. Basically, I have created multiple tags with the lang property in each of them, so that giving the certain lang a display value of -none-, hides it, and a value of -inherit- to show it. In that way, using the line: a:lang(en),p:lang(en) { display : none } a:lang(it),p:lang(it) { display : inherit } I can see one language at a time. And that works! Now, I

What <html lang=“”> attribute value should I use for a mixed language page?

丶灬走出姿态 提交于 2019-11-28 16:58:13
I usually use this: <html lang="en"> . However, I am working on a website that will use two languages and mix them up sometimes in the same sentence or heading. How would the above code look in this case? Can I use <html lang="lang1 lang2"> ? Jamie Dixon As far as I can tell from reading the HTML5 spec the lang attribute: value must be a valid BCP 47 language tag, or the empty string Source: http://www.w3.org/TR/html5/dom.html#the-lang-and-xml:lang-attributes There's no mention in the spec of an array of language strings and every example I've found uses a single language string. This makes

What <html lang=“”> attribute value should I use for a mixed language page?

 ̄綄美尐妖づ 提交于 2019-11-27 10:06:34
问题 I usually use this: <html lang="en"> . However, I am working on a website that will use two languages and mix them up sometimes in the same sentence or heading. How would the above code look in this case? Can I use <html lang="lang1 lang2"> ? 回答1: As far as I can tell from reading the HTML5 spec the lang attribute: value must be a valid BCP 47 language tag, or the empty string Source: http://www.w3.org/TR/html5/dom.html#the-lang-and-xml:lang-attributes There's no mention in the spec of an