Skip to main content
Participating Frequently
December 15, 2019
Answered

InDesign 2020 ePub export creates xml:lang spans

  • December 15, 2019
  • 3 replies
  • 1339 views

Since swithching from CS6 to CCInDesign 2020, when I export to flowing ePub, e2 or e3, The resulting ePub HTML is loaded with the following spans between almost every word: <span xml:lang="en-GB">. There must be 100,000 of these, too many to search and delete/replace. Also, added "magically" to my classes is <xml:lang="en-US"> as follows: <p class="aabody" xml:lang="en-US">  The same file exported fine using CS6, no such spans or class changes. Is it a setting or a bug?  Below is ONE papragraph from the epub.

<p class="aabody" xml:lang="en-US"><span xml:lang="en-GB">I</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">slipped</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">back</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">through</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">ferns</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">along</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">ratty</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">edge</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">of</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">vacant</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">lot</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">watching</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">for</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">broken</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">bottles</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">and</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">beer</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">cans</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">crossed</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">street</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">farther</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">up</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">went</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">half</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">a</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">block</span><span xml:lang="en-GB">, </span><span xml:lang="en-GB">then</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">down</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">the</span><span xml:lang="en-GB"> </span><span xml:lang="en-GB">alley</span><span xml:lang="en-GB">.</span></p>

This topic has been closed for replies.
Correct answer Jongware

Is the language in your original file applied as a local override?

3 replies

Participating Frequently
March 11, 2020

Hey, John, if this is still happening to you, I found a work-around. I had 8k <span lang="en-GB" xml:lang="en-GB"> in an epub export this morning too, been struggling with it all morning. Working in Calibre, I did a find/replace "<span lang="en-GB" xml:lang="en-GB">" with " " and it cleaned out all the opening <span lang="en-GB" xml:lang="en-GB">. Then I used the Tools > Fix html option and it removed all the extra </span> codes... voila, fixed.

Participant
January 3, 2023

This works! was having the same issue with InDesign CC 2023. It created an empty lang="" and caused the file to be rejected with epub validators. So I used sigil to find and replace lang="" and it went through. 


Thank you so much!

Derek Cross
Community Expert
Community Expert
December 15, 2019

Are you sure you didn't inadvertently export it as a FXL ePub?

JohnMozAuthor
Participating Frequently
December 15, 2019

You mean "fixed layout" epub? I did it several times and each time it was "reflowable" epub. I tried both e3 and e3.

Derek Cross
Community Expert
Community Expert
December 15, 2019

Maybe you need to start again. Did you apply Paragraph and Character Styles to all the text, no Master Pages, no folios, all images anchored?

Jongware
Community Expert
JongwareCommunity ExpertCorrect answer
Community Expert
December 15, 2019

Is the language in your original file applied as a local override?

JohnMozAuthor
Participating Frequently
December 15, 2019

Language in my paragraph styles was noted as US English. Language was not applied locally or any other way. Dictionary was US Eglish. What's changed since CS6 that would cause this. The exact same file exported from CS6 without any of these spans. See the sample paragraph I added to my post.  Interestingly, my dash syling is British, but no special style was applied to the dashes.

JohnMozAuthor
Participating Frequently
December 16, 2019

I rechecked, and in fact GB English was a localized "character attribute for some reason (Word import probably.) Never would have thought. But I saw that I did cheat by not removing all localized formatting from my paragraphs on this book. Bad me. It appeared to make no difference and I was in a hurry. InDesign CS6 didn't seem to care, but 2020  showed me, and how. But, InDesign 2020 does lie. Even with the "preserve local overides" box left unchecked it did include local overides. I'd say it is a bug. So beware, bug or not.

Thank you for pointing me in the right direction. Thank you. Thank you all.