Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take <html lang="xx"> to detect language of a zhook/orchook #8

Open
elmimmo opened this issue Jan 27, 2011 · 0 comments
Open

Take <html lang="xx"> to detect language of a zhook/orchook #8

elmimmo opened this issue Jan 27, 2011 · 0 comments

Comments

@elmimmo
Copy link

elmimmo commented Jan 27, 2011

I thought initially, that there was little point in zhooks requiring (or at least peregrin expecting) a meta tag to declare the language of a zhook, when <html lang="xx"> does that just fine and is actually becoming necessary anyway (for example, for proper hyphenation).

I was about to ask then to prioritize <html lang="xx"> over <meta>.

Now, though, after reading the following question: Should I declare the language of my XHTML document using a language attribute, the Content-Language HTTP header, or a meta element? at W3's internationalization's website, and seeing that there is apparently a point in choosing meta over lang or viceversa, I do not know any more. Does WHATWG have a specific guideline tied to HTML5 in that respect?. Anyhow, I thought about throwing the question.

Some things to also take into account, maybe, is that EPUB allows for multiple language declarations. With <html lang="xx"> you can only declare one single primary language, and thus does not let you declare several languages in equal measure. The OPF spec is not as explicit about what the language declaration actually means, but I would assume that it denotes what the target audience of the book is, hence, arguably, a meaning closer to what the meta tag seems to be for, more so than lang. Yet, while one could argue that it is advisable to always have a lang property in the <html> tag, the HTML5 spec's explanation of how the language of a node is to be determined seems to suggest that meta is only needed when there is more than one primary language (bilingual books?) or when, for whatever reason, languages in meta and lang should be different (?).

At any rate, peregrin now seems to be ignoring even the standard way of using meta to declare content language: <meta http-equiv="Content-Language" content="de, fr, it">. That is what everybody is using, and what the HTML5 specification mandates regarding content language.

PS: the point of xml:lang next to, or instead of plain lang, beats me. I cannot decipher the hieroglyphs in the HTML5 spec regarding that. No need help me with that on this thread though, unless it has anything to do with something that peregrin should be taking into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant