Quote:
Originally Posted by ebray187
Also i have set the <dc:language>es</dc:language> into the content.opf file
|
An EPUB's language goes like a pyramid:
- book-level = content.opf
- chapter-level = <html>
- word-level = <span>
1. Setting the content.opf correctly is the most important! And you did that great.
This says "this book is in Spanish!"
2. (Optional) Add
lang +
xml:lang to your <html>:
Chapter01.xhtml (Before):
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
Chapter01.xhtml (After):
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
This says "this chapter is Spanish!"
3. (Super duper optional) Mark "foreign words" with their language:
Code:
<p>¿Puedo ir al bathroom, por favor?</p>
Code:
<p>¿Puedo ir al <span lang="en" xml:lang="en">bathroom</span>, por favor?</p>
This says "the entire book/chapter/sentence is in Spanish, but the word 'bathroom' is English!"
Quote:
Originally Posted by ebray187
I had understood that adding the xml:lang="X" was enough for it to work properly.
|
Any time you're marking which language, it's good practice to use BOTH
lang +
xml:lang.
Basic idea is lang = HTML + xml:lang = XML.
I explained a little more in this post a few days ago:
"Search and Replace" (Post #11)
And one common error that occurs is someone having the book + chapters be mismatched.
(So a Spanish book "es", but you accidentally set English "en" in an HTML chapter. This is pretty easy to spot in the Language column in
Tools > Spellcheck > Spellcheck.)