BookTranslator
BookTranslator

Translated EPUB Table of Contents Wrong? Fix nav.xhtml and toc.ncx

Why a translated EPUB can keep original chapter names in its contents menu, how to tell nav.xhtml from toc.ncx, and free scripts to check and sync them.

BookTranslator

BookTranslator Team

8 min read

If the chapters in your translated EPUB are in the new language but the contents menu is not, the labels were probably never translated. An EPUB does not build its menu from your chapter headings. It stores the menu separately, and can store it twice: once in a navigation document (usually nav.xhtml) and once in an NCX file (usually toc.ncx). A translator can update one, both, or neither.

So if a book shows translated chapter names in one reading app and original ones in another, check whether its two lists disagree. The apps may be reading different lists.

Start by finding out which list is wrong. We wrote a free checker and a sync script that tell you which one it is and repair the case where one list is right. Neither needs anything installed except Python 3, and neither changes the file you give it.

Quick Answer: Match the Symptom to the Fix

What you seeLikely causeFix
Menu is in the original language in one app, translated in anotherOnly nav or only the NCX was translatedCopy the good labels across with sync_epub_toc.py
Menu is in the original language everywhereNeither list was translatedEdit the labels in Sigil or Calibre, or regenerate from translated headings
"Contents" or "Part One" stays in the original language, chapter names are fineText in the list that is not a link was skippedEdit those few words by hand
A menu entry opens the wrong place or does nothingThe link points to a missing file or anchorFix the link, then check again
Menu shows only "Start" or one entryThe list itself is incomplete, which is not a translation problemRegenerate it from the headings
Menu entry and chapter heading use different wordingThey were translated as separate pieces of textChoose one wording and edit the other

Why an EPUB Has Two Tables of Contents

EPUB 3 requires a navigation document, declared with the nav property. It is a normal XHTML file containing a list of links. The older format, EPUB 2, stored the same information in the NCX file.

The EPUB 3 specification now calls the NCX legacy, and says reading apps must not support legacy features in content that conforms to the current version. But an EPUB 3 file can still carry an NCX, and tools can add one so that older EPUB 2 devices can use the book. So a file can hold two separate lists that nothing keeps in sync. By the specification, a current app should use the nav list and an EPUB 2-only device the NCX. Not every app follows the current specification, and we did not test which one each app reads, so treat a mismatch as the first thing to rule out.

The two lists are also separate from your chapters. Changing a heading does not change the menu, and changing the menu does not change a heading.

Step 1: Find Out Which List Is Wrong

Download check_epub_toc.py, then compare your original with the translation:

python3 check_epub_toc.py original.epub translated.epub

Here is the output for one of our test books, a book whose NCX file is named book.ncx (original, translated), shortened to the lines that matter. The ES~ marker stands in for real translated text:

Compared with the original:
  nav: 0 of 3 labels unchanged
  NCX: 3 of 3 labels unchanged

  - nav says 'ES~Chapter One: The Harbor' but NCX says 'Chapter One: The Harbor'
  - NCX: label not translated: 'Chapter One: The Harbor'
  - nav heading not translated: 'Contents'
  - nav section label without a link not translated: 'Part One'

So nav is fine and the NCX was missed. The checker also reports links that point to a missing file or anchor, and any disagreement between the two lists about where entries go. Run it on a single file to skip the comparison.

If the book title is reported as "NCX title not translated", you can usually ignore it unless you are publishing the book. Title and language metadata are a separate job, covered in how to localize ebook metadata.

Step 2: Fix the Labels

If one list is right, sync the other

This is the case sync_epub_toc.py handles. Keep it in the same folder as the checker. Tell it which list has the right labels:

python3 sync_epub_toc.py translated.epub fixed.epub --from nav

It matches entries by where they point, not by position, and writes a new file. In our two test books with this problem, it updated all 3 labels and the checker then reported 0 of 3 unchanged for both lists. An entry whose target exists on only one side is left alone and listed for you to check. The script keeps links and chapters as they are. Use it and the checker on the single-language file only: a two-language file holds both languages in its labels, so the lists can differ by design, and the scripts cannot tell it apart.

If neither list is translated

Use an EPUB editor. We followed these from each tool's documentation and did not test them on our samples.

  • Sigil, using your headings: Generate Table of Contents rebuilds the list from headings. This only helps if the headings are translated and marked up as real headings. Sigil notes that it also updates your HTML documents, so work on a copy.
  • Sigil, by hand: the same guide describes Edit Table of Contents for when you cannot use the headings. Each entry must still point to a valid target.
  • Calibre: in the Edit book tool, Tools, Table of Contents, Edit Table of Contents lets you edit the entries. The manual describes generating them from headings for a book without a table of contents.

After regenerating, compare the entry count with the original. A book with unmarked chapter titles can lose entries here, and a shorter menu is worse than an untranslated one. If your EPUB 3 file has no NCX and you read on an older device, Sigil can add one with Tools, Epub3 Tools, Generate NCX/Guide for epub2 e-readers.

If only a word or two is left

"Contents" and "Part One" are often a few words in nav.xhtml. Open the file in Sigil or Calibre, retype the words, and save. Do not change the href values.

Step 3: Check the Result on Your Reader

Run the checker again, then open the book in the app or device you will actually use. A clean report means the file's lists agree and their links resolve. It does not tell you what a particular device displays, and we did not test devices for this guide.

Tap the first, a middle, and the last entry. Calibre's Check book tool also finds broken links and malformed files. For a full pass across Kindle, Kobo, and Apple Books, use our e-reader testing guide, and the EPUB translation QA checklist for everything beyond navigation.

What BookTranslator Does With Each List

We ran BookTranslator's EPUB code on five test books on 2026-11-05, with the translation step replaced by a marker. This shows which text gets translated and written back. It does not measure translation quality, and this code can change.

How the book is builtnav linksNCX labelsNot translated
nav.xhtml outside the reading order, plus toc.ncxTranslatedTranslated"Contents" heading, "Part One" label without a link
NCX file with another name, such as book.ncxTranslatedNot translatedSame as above
Nav file not named nav, with two properties such as nav scriptedNot translatedTranslatedSame as above
nav.xhtml inside the reading orderTranslated, including heading and section labelsTranslatedNothing in the lists
EPUB 2 with a contents page listed in the guideNo nav in this formatTranslatedNothing in our sample. On the contents page, headings and links are translated; other text is not

In every run, the links stayed the same, so a translated entry still opens the same place. The NCX book title and the dc:title metadata stayed in the original language, while dc:language changed to the target.

Two more things follow from how the code works:

  • Menu and heading can differ. Menu labels are sent separately from the chapters, so the same title can be translated in two slightly different ways. Fix it by hand if it matters to you.
  • Bilingual files show both languages. In the two-language download, an NCX label becomes Original | Translation, and a nav link holds the original and translation on two lines. The exception is a nav inside the reading order, which holds the translation only. Long entries get longer, so check that the menu is still readable.

If you have not translated the book yet, you can upload the EPUB and run the checker on the single-language file you download. To compare other options first, see the best EPUB translation tools. Whichever you use, keep the original file so the comparison is possible.

Related Posts

Translated EPUB Table of Contents Wrong? Fix nav.xhtml and toc.ncx