EPUB Error: Missing Language Declaration (dc:language)

OPF-012: the dc:language element is missing from the package metadata

What causes this error?

The EPUB 3 specification requires at least one <dc:language> element in the OPF metadata block to declare the primary language of the publication. Without it, EPUBCheck reports OPF-012, and distribution platforms cannot determine the language for accessibility configuration, screen reader settings, text-to-speech, or search indexing. This element is frequently absent when EPUB files are generated from templates that do not automatically populate all metadata fields, when authors convert from plain text or Markdown without setting document language properties first, or when conversion tools treat this field as optional and omit it. Apple Books and IngramSpark validate this field strictly; KDP is more lenient but still records a metadata warning that can affect discoverability.

How to fix it

  1. Open content.opf and locate the <metadata> block — search for an existing <dc:language> element. If it is absent, add one.
  2. Use a BCP 47 language tag as the element value: <dc:language>en</dc:language> for English. Common codes: en (English), en-US (American English), en-GB (British English), fr (French), de (German), es (Spanish), pt (Portuguese), ja (Japanese).
  3. Place the element inside the <metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> block alongside your existing dc:title and dc:creator elements.
  4. If publishing a bilingual or multilingual title, add one <dc:language> element per language — the first one is treated as the primary language by most platforms.
  5. Re-validate with EPUBCheck to confirm OPF-012 is cleared, then re-upload to any platform that previously flagged the missing language.

Common questions

What format is the language code — can I write "English" instead of "en"?

No — the value must be a BCP 47 language tag, not the spelled-out language name. "en" is correct for English; "English" would be an invalid code that EPUBCheck rejects. BCP 47 uses two-letter ISO 639-1 codes, optionally followed by a region subtag: "en-US", "fr-CA", "zh-TW".

Do I need this even if my book is entirely in one language?

Yes. The dc:language declaration is required by the EPUB 3 specification regardless of whether the content is monolingual. Even a simple English-only book needs <dc:language>en</dc:language> in its OPF metadata to pass EPUBCheck validation.

Check your EPUB before uploading

The free EPUB Validator catches structure, metadata, and navigation errors — no signup, no Java, runs in the browser.

Validate Your EPUB Free →

Building your EPUB correctly from the start prevents most of these errors before they happen. See the EPUB formatting guide for the full workflow: manuscript cleanup, TOC, front matter, EPUB 3.0 generation, and validation.

Common EPUB errors: Missing dc:identifier (unique identifier), Empty title tag (Kobo metadata error), Unique identifier not found (OPF-048)

Platform rejection guides: Why Apple Books rejects ebooks