---
title: How to Correct the Language Metadata in an EPUB Using Calibre
description: A detailed guide on how authors can correct the language declaration in the epub file.
---

[Skip to content](https://help.publishdrive.com/how-to-correct-the-language-metadata-in-an-epub-using-calibre#main-content)

English

Show submenu for translations

[More support](https://help.publishdrive.com/kb-tickets/new?hsLang=en)

![pd-white.png\]](https://help.publishdrive.com/hs-fs/hubfs/pd-white.png?height=38&name=pd-white.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [More support](https://help.publishdrive.com/kb-tickets/new)
- Go to publishdrive.com

 Go to publishdrive.com

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [PublishDrive Help Center](https://help.publishdrive.com/?hsLang=en)
2. [Book Upload And Correction](https://help.publishdrive.com/book-upload-and-correction?hsLang=en)
3. [Ebook Conversion](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#ebook-conversion)

# How to Correct the Language Metadata in an EPUB Using Calibre

If your EPUB has been rejected because the language declared in its internal metadata does not match the actual language of the book, you can correct the language using **Calibre**.

For example, you may receive the following error:

**The language declared in your EPUB's internal metadata (OPF file) is English, while your book is written in Italian; please change it from "en" to Italian ("it").**

This means that the EPUB's **OPF metadata** currently identifies the book as English (en), while the content of the book is actually Italian.

You need to change the language declaration from:

\<dc:language\>en\</dc:language\>

to:

\<dc:language\>it\</dc:language\>

The Italian language code is *it*.

 

**Before you begin**

You will need:

- The original EPUB file
- Calibre installed on your computer
- A backup copy of your original EPUB

It is recommended that you work on a copy of the EPUB so that you always have the original file available.

Calibre creates its own copy of a book when you add it to the Calibre library, so changes made within Calibre do not modify the original file you initially added. [manual.calibre-ebook.com](https://manual.calibre-ebook.com/gui.html)

 

**Correct the language directly in the EPUB's OPF file**

This method is particularly useful when the error specifically says that the language declared in the **OPF file** is incorrect.

**Step 1: Open the EPUB in Calibre**

1. Right click on the EPUB file.
2. Select “Open with”.
3. Select “The Calibre e-book editor”.

Calibre's E-book Editor supports EPUB files and allows you to edit the HTML, CSS and other internal files contained within the EPUB.

 

**Step 2: Locate the OPF file**

When the E-book Editor opens, you will see the files contained within the EPUB in the **File Browser** on the left.

Look for a file with the .opf extension.

It is commonly named something like: content.opf

![](https://help.publishdrive.com/hs-fs/hubfs/undefined.png?width=280&height=316&name=undefined.png)

The exact filename can be different depending on how the EPUB was created.

Calibre identifies the OPF as the file containing the book's metadata.

 

**Step 3: Open the OPF file**

Double-click the content.opf file.

You will see XML similar to:

\<metadata\>

\<dc:title\>Example Book\</dc:title\>

\<dc:creator\>Author Name\</dc:creator\>

\<dc:language\>en\</dc:language\>

\</metadata\>

The important lines are:

xml:lang="en"

\<dc:language\>en\</dc:language\>

id="meta-language"\>en\<

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-Nov-12-2026-02-28-35-6238-PM.png?width=907&height=226&name=undefined-Nov-12-2026-02-28-35-6238-PM.png)

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-1.png?width=908&height=137&name=undefined-1.png)

The value en means **English**.

 

**Step 4: Change** ***en*** **to** ***it***

For an Italian-language book, change:

\<dc:language\>en\</dc:language\>

to:

\<dc:language\>it\</dc:language\>

Do **not** change the dc:language element itself. Only replace the language code.

After the correction, this is how the same sections should look:

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-4.png?width=907&height=228&name=undefined-4.png)

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-2.png?width=908&height=146&name=undefined-2.png)

 

**Correct example**

\<dc:language\>it\</dc:language\>

**Incorrect examples**

Do not use:

\<dc:language\>Italian\</dc:language\>

or:

\<dc:language\>Italiano\</dc:language\>

The EPUB should use the appropriate language code, which for Italian is: it

 

**Step 5: Check the HTML language declarations**

The OPF metadata is the main issue in this particular error, but it is also a good idea to check the language declarations in the XHTML/HTML files.

For example, the **titlepage.xhtml** can still show the incorrect language declaration:

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-Nov-12-2026-02-28-36-1776-PM.png?width=908&height=183&name=undefined-Nov-12-2026-02-28-36-1776-PM.png)

As detailed above, just change the language code from en to it.

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-Nov-12-2026-02-28-35-9350-PM.png?width=907&height=172&name=undefined-Nov-12-2026-02-28-35-9350-PM.png)

The **toc.ncx** file also has a language declaration section:

![](https://help.publishdrive.com/hs-fs/hubfs/undefined-Nov-12-2026-02-28-36-4721-PM.png?width=907&height=183&name=undefined-Nov-12-2026-02-28-36-4721-PM.png)

 

As detailed above, just change the language code from en to it.

**![](https://help.publishdrive.com/hs-fs/hubfs/undefined-3.png?width=907&height=164&name=undefined-3.png)**

**Important**

If the error only says:

The language declared in your EPUB's internal metadata (OPF file)...

the **OPF language is the required correction**.

Changing the HTML language declarations is a useful additional check, but it should not be presented as a replacement for correcting the OPF metadata.

 

**Common language codes**

Here are some commonly used EPUB language codes:

| **Language** | **Code** |
| --- | --- |
| English | en |
| Italian | it |
| Spanish | es |
| French | fr |
| German | de |
| Portuguese | pt |
| Dutch | nl |
| Polish | pl |
| Romanian | ro |
| Hungarian | hu |
| Czech | cs |
| Greek | el |
| Japanese | ja |
| Chinese | zh |
| Korean | ko |
| Russian | ru |
| Ukrainian | uk |

 

For books written primarily in one language, the language declared in the EPUB metadata should correspond to the actual language of the book.

You can find more language codes here: [https://www.loc.gov/standards/iso639-2/php/code\_list.php](https://www.loc.gov/standards/iso639-2/php/code_list.php)

 

**What if the book contains multiple languages?**

If the book genuinely contains multiple languages, do not automatically change the metadata to one language simply because another language appears in some sections.

For example, a book may be primarily Italian but contain:

- an English introduction;
- quotations in English;
- a bilingual glossary;
- individual passages in another language.

In such cases, the book's **primary language** should be identified appropriately, while individual passages can have their own language declarations where necessary.

Calibre's language tools also recognize language information from metadata and lang attributes in HTML files, which helps when a book contains text in multiple languages.

- [Book Upload And Correction](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#main-content)

    - [Uploading A Book](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#uploading-a-book)
    - [Book Correction And Common Errors](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#book-correction-and-common-errors)
    - [Ebook Conversion](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#ebook-conversion)
    - [Content Guidelines](https://help.publishdrive.com/book-upload-and-correction?hsLang=en#content-guidelines)
- [Stores And Distribution](https://help.publishdrive.com/stores-and-distribution?hsLang=en#main-content)

    - [Store Selection](https://help.publishdrive.com/stores-and-distribution?hsLang=en#store-selection)
    - [Publishing Status](https://help.publishdrive.com/stores-and-distribution?hsLang=en#publishing-status)
    - [Partner Stores And Special Terms](https://help.publishdrive.com/stores-and-distribution?hsLang=en#partner-stores-and-special-terms)
    - [Terms Of Distribution](https://help.publishdrive.com/stores-and-distribution?hsLang=en#terms-of-distribution)
    - [Payout Terms](https://help.publishdrive.com/stores-and-distribution?hsLang=en#payout-terms)
- [Account, Subscription and Pricing](https://help.publishdrive.com/account-subscription-and-pricing?hsLang=en#main-content)

    - [Subscription Options](https://help.publishdrive.com/account-subscription-and-pricing?hsLang=en#subscription-options)
    - [Account Management](https://help.publishdrive.com/account-subscription-and-pricing?hsLang=en#account-management)
    - [About PublishDrive](https://help.publishdrive.com/account-subscription-and-pricing?hsLang=en#about-publishdrive)
    - [PublishDrive Distribution](https://help.publishdrive.com/account-subscription-and-pricing?hsLang=en#publishdrive-distribution)
- [Royalty Payments And Sales Analytics](https://help.publishdrive.com/royalty-payments-and-sales-analytics?hsLang=en#main-content)

    - [Sales Analytics](https://help.publishdrive.com/royalty-payments-and-sales-analytics?hsLang=en#sales-analytics)
    - [Royalty Payments](https://help.publishdrive.com/royalty-payments-and-sales-analytics?hsLang=en#royalty-payments)
- [Marketing And Promotion](https://help.publishdrive.com/marketing-and-promotion?hsLang=en#main-content)

    - [Promotion Tools On PublishDrive](https://help.publishdrive.com/marketing-and-promotion?hsLang=en#promotion-tools-on-publishdrive)
    - [Marketing Tips](https://help.publishdrive.com/marketing-and-promotion?hsLang=en#marketing-tips)
- [Print-On-Demand And Audio Distribution](https://help.publishdrive.com/print-on-demand-and-audio-distribution?hsLang=en#main-content)

    - [Audiobook Distribution](https://help.publishdrive.com/print-on-demand-and-audio-distribution?hsLang=en#audiobook-distribution)
    - [Print-On-Demand Distribution](https://help.publishdrive.com/print-on-demand-and-audio-distribution?hsLang=en#print-on-demand-distribution)
- [PublishDrive Abacus](https://help.publishdrive.com/publishdrive-abacus?hsLang=en#main-content)

    - [Team Royalties](https://help.publishdrive.com/publishdrive-abacus?hsLang=en#team-royalties)
    - [PublishDrive Abacus](https://help.publishdrive.com/publishdrive-abacus?hsLang=en#publishdrive-abacus)
- [Publishing Assistant](https://help.publishdrive.com/publishing-assistant?hsLang=en)
- [PublishDrive Essentials](https://help.publishdrive.com/publishdrive-essentials?hsLang=en#main-content)

    - [First Steps With PublishDrive](https://help.publishdrive.com/publishdrive-essentials?hsLang=en#first-steps-with-publishdrive)
- [Exclusive Copyright Documents / Trademarks](https://help.publishdrive.com/exclusive-copyright-documents-trademarks?hsLang=en)
- [General Information](https://help.publishdrive.com/general-information?hsLang=en)

[![Chill listening crop-3](https://help.publishdrive.com/hs-fs/hubfs/publishdrive_logos_rgb-02.png?width=55&height=55&name=publishdrive_logos_rgb-02.png "Chill listening crop-3")](http://publishdrive.com?hsLang=en)

PublishDrive Help Center

Copyright © 2026, PublishDrive Inc.