• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

2023 bug: ePUB export lang="en-US" added to paragraph and span tags

Community Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

I have noticed since upgrading to inDesign 2023, that when I export an ePUB file, it's adding— lang="en-US" to ALL paragraph and span tags. The file will no longer validate, it comes up with thousands of errors. For example, all instances of paragraphs, headings, etc. have the language attribute applied: <p class="Content_initial-para" lang="en-US"> and when validating the file, the error comes up that that is not a valid attribute.

 

Anyone else had this issue? How do we fix it? There are no settings in the ePUB output to cause this, and it wasn't happening before I upgraded to 2023.

TOPICS
Bug , EPUB

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 18, 2022 Nov 18, 2022

I can vouch for the added tag (which I can't say whether I've seen before or not it's not in earlier exports I have on hand), but epubcheck shows no validation errors for it. As this is both the gold standard for validation and the core of many validators, I'm not sure why you're seeing an error.

 

ETA: Kindle Previewer, the other touchstone for real-world validation, doesn't mind or note the added tag.

 

Generally, superfluous tags in the code don't generate validation issues. EPUB code could b

...

Votes

Translate

Translate
Community Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Validation error says: Error while parsing file: value of attribute "lang" is invalid; must be an RFC 3066 language identifier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

I can vouch for the added tag (which I can't say whether I've seen before or not it's not in earlier exports I have on hand), but epubcheck shows no validation errors for it. As this is both the gold standard for validation and the core of many validators, I'm not sure why you're seeing an error.

 

ETA: Kindle Previewer, the other touchstone for real-world validation, doesn't mind or note the added tag.

 

Generally, superfluous tags in the code don't generate validation issues. EPUB code could be tripled in length by adding default, assumed or null tags and it shouldn't bother any validation process.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Thank you. I cannot get epubcheck to run on my computer. I use an online validator: https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator

I've included a screenshot from epubcheck from W3c. It will not open.  😞

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Yes, fun with MacOS's careful protections. 🙂

 

There are many validators out there and they vary as much as EPUB readers, all too often taking a core tool like epubcheck and adding features that put it in a UI wrapper, make it "easier to use" or interpret results in plain(er) English, or even add validation points not fully conforming to the EPUB standard. (I am in a state of perpetual face-palmed aghastness at the general state of the online ebook world, so this does not surprise me.) It's likely that that site is running an older/modified validator of some kind — especially as said ebook world never, ever updates anything or takes down obsolete material.

 

I'd "validate" your EPUB using another process — take that heads up that the one you are using may not be up to snuff — or figure out how to tell your Mac that epubcheck.jar comes in peace and means no harm. 🙂

 

That said, I don't know why Adobe decided to add this export detail. It may be ongoing effort to make the exports compliant with (updated) standards; I just got a notice that a long-standing flaw with end note exports has been fixed in the current pre-release version, so EPUB export seems to be getting some overdue attention.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Don't even get me started on endnotes! Up until now, I've had to convert all endnotes to cross-references in inDesign, in order for the link-backs to work in the ebook. I. haven't tested that since the 2023 update, so hopefully (fingers crossed), they've fixed that now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Yeah, they either work perfectly or drive you crazy. Note that the change isn't in the 2023 release right now; it's in the next, present pre-release version.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 22, 2022 Dec 22, 2022

Copy link to clipboard

Copied

ebookit didn't flag this code until recently. I ran some previously validated epub files through and the error shows up now. I tried a couple other online epub validators and they came back with the comments too. 

 

The error specifically is "lang attribute...must be an RFC 3066 language identifier." From everything I can find en-US is a valid value. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 22, 2022 Dec 22, 2022

Copy link to clipboard

Copied

As nearly as I can tell, ID did not add this extra code until v18.0. I looked at exports I'd done in the recent past; no 'lang' statements.

 

In any case, it has been removed in v18.1, along with a number of other fixes, updates and TLC for EPUB export. (Such as making EPUB 3 the default!)

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

Teaberrycr - I wish I could take you out for a beer or glass of wine for this. I had the same error on a client's book and had no idea how to fix it. Yours is the first comment I found online that clarified what the issue truly was. THANK YOU SO MUCH!!!! I downloaded the earlier version of Indesign 17, opened my file, created the ebook and WOW! No errors. You made my week a thousand times easier. Thank you again!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

Over-reliance on EPUB validators is the source of more headaches in the EPUB workflow than they are worth, IMVHO. Much of what they check is arbitrary and has little to do with the "validity" of an ebook file.

 

If you insist on validating rigorously, it can be helpful to understand the technical structure well enough to be able to interpret and judge any reported errors. Otherwise, you can't tell a genuine problem (that will interfere with reading, accessibility, navigation, etc.) from a completely trivial (and IMHO, pointless and possibly wrong — there is nothing wrong with that language tag or its coding) "error" like this one.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

Many of my clients use Smashwords, and they are VERY particular about the ePUB files. They will send the file back for very minor errors, so I always validate to avoid that. Even Amazon KDP and IngramSpark lately, are getting more finicky about error-free ePUBs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

Well, yes. Don't get me started. The EPUB world, supposedly driven by/to a single standard, is a swamp of players doggedly championing their own interpretation of what "standard" means. Let's not even go into how almost no two readers present a book (with or without flaws) the same way. Smashwords' choice is to be pointlessly rigorous about validation, using a particular tool and validation set, and rejecting completely normal variations. (As with all markup documents, there is no single, perfect code implementation; a single book could have several builds indistinguishable to reader apps and readers and all completely "validated.")

 

Things like this added lang tag are completely valid elements, but whoever wrote any one validator may have failed to accommodate them in the parsing functions.

 

ID rarely writes bad EPUB unless the document file has evident flaws, which can come from poor construction or sloppy work by the designer or from doc corruption. My touchstone is simple: If an EPUB displays and navigates correctly in Thorium, it's good. If an EPUB converts to Kindle without problems, it's good. And if a Kindle-from-EPUB displays and navigates correctly in Previewer, it's good... regardless of what any random "validator" shows. I haven't had a book rejected in a very long time by any service.

 

Which is why I don't bother with the seller sites that have their own arbitrary standards, just to reach a minor segment of the market.

 

And yeah, that's the short version. Sorry.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 02, 2022 Dec 02, 2022

Copy link to clipboard

Copied

This appears to have been fixed in the current prerelease version. A prior request (with a murky title, which is why I didn't find it) was combined with mine, all discussion is here:

 

https://indesign.uservoice.com/forums/601180-adobe-indesign-bugs/suggestions/45879523-issues-with-ep...

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 02, 2022 Dec 02, 2022

Copy link to clipboard

Copied

Thanks for this. FINALLY this issue is being addressed!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

I am curious, how exactly are you seeing it as fixed? I just ran a quick test from InDesign 18.1 for an article I am writing, and I am still seeing lang attributes on every <p> in the EPUB.

<p class="bt_Body-Text" lang="en-GB">The French sentence “<span class="French-Italic" lang="fr-FR" xml:lang="fr-FR">Papa fume un pipe</span>” translates to “Dad smokes a pipe”.</p>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

It's not, or it's reverted. I am pretty sure I tested and saw no lang statements when I got 18.1 installed, but there they are again.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

So, the official bugfix notes only mention that the validation issues are fixed: EPUB Validation Check fails because of erroneous "lang" identifiers in the underlying HTML of EPUB.

It does not mention that the language tags have been removed.

It is not a scientific test, but one of my testing files passes the validation site @teaberrycr mentions. So I am very curious if his files that previously failed, would now pass. 😄

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2023 Jan 03, 2023

Copy link to clipboard

Copied

Actually, you're right; it's a bit circular and vague.

 

[First answer deleted as nonsense.]

 

I've looked back through a series of EPUBs and it is unclear what Adobe changed, if anything; exports now seem to have exactly the same 'lang' statements as the intermediary ones that caused validation errors, and did not exist in prior exports.

 

Maybe it's just that the various EPUB sites updated their validators to the newest core version of epubcheck and the problem thus no longer exists...

 

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

I export to HTML, and having to go back to CC2022 to export so we don't get this language class added. It's truly a hassle for doing this. This language can be defined in the CSS style sheet and not have to be assigned to each paragraph and span. I wish Adobe will fix this. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

The fix with v18.1 was to correct some formatting error with the tag, not remove it. I don't know why Adobe added these redundant tags to every exported style; I have more or less confirmed it's not for standards compliance.

 

I haven't had any further problems and the EPUB exports validate fine, but would vote again for Adobe either reverting to  the prior practice, or making all these null tags switchable if they think there's some demand for them.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 15, 2023 Feb 15, 2023

Copy link to clipboard

Copied

LATEST

I appreciate the info James.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines