4.8 Language Declaration Issues

Making Ebooks with InDesign: Module 4, Step 8

  • Subject(s):

    InDesign to EPUB

  • Resource Type(s):

    Step-by-Step

  • Audience:

    Technical

Suggested Prerequisite

Before reading this, you might want to read:

Language Declaration Issues

There are a number of things as pertains to language declarations that need to be cleaned up in an InDesign-exported EPUB. 

As noted in an earlier video, get rid of these extra language declarations on every single piece of HTML. These are aren’t invalid but they are wrong and won’t help your content. In the school of clean, simple HTML is the best HTML, clean these out. 

Snippet of code from an HTML file with the extra language declarations — lang=”en-US” — highlighted.

Move the language declaration up to the root HTML element. InDesign erroneously puts this on the <body> tag. This must be fixed. And it can be done globally with some ease. 

The same code snipped with the language declaration on the body element circled in red and an arrow pointing to the end of the html element on line 3.

The same snippet again with the language declaration in the correct place.

Check in on your language shifts and make sure that they are code as you intend. 

A paragraph from the HTML with the French language declaration underlined in red.

Finally, have a look at the OPF file. Because we have a tiny French language shift in this book, InDesign thinks this is a bilingual publication. The primary language is in fact English in this case, so I will delete the French declaration in the OPF. 

The metadata from the OPF with the French language declaration crossed out in red.

Next Steps

1

Module 4, Step 9

4.9 Semantics and DPUB ARIA

Making Ebooks with InDesign: Module 4, Step 9

Subject(s): InDesign to EPUB
Resource Type(s): Step-by-Step
Audience:
Technical
2

Module 4, Step 10

4.10 Accessibility Metadata

Making Ebooks with InDesign: Module 4, Step 10

Subject(s): InDesign to EPUB
Resource Type(s): Step-by-Step
Audience:
Technical
3

Module 4, Step 11

4.11 CSS Cleanup

Making Ebooks with InDesign: Module 4, Step 11

Subject(s): InDesign to EPUB
Resource Type(s): Step-by-Step
Audience:
Technical
4

Module 4, Step 12

4.12 Quality Assurance

Making Ebooks with InDesign: Module 4, Step 12

Subject(s): InDesign to EPUB
Resource Type(s): Step-by-Step
Audience:
Technical
5

Module 4, Step 13

4.13 Validation + Accessibility Checker Tools

Making Ebooks with InDesign: Module 4, Step 13

Subject(s): InDesign to EPUB
Resource Type(s): Step-by-Step
Audience:
Technical

Want to discuss this resource?