By the way, I fixed the formatting in your original post. For future reference, you will find a code button on the formatting toolbar (looks like </>) which you can use to safely insert XML, HTML or anything else that is preformatted.
Language markers
On this, I have not been able to achieve the result you describe, of getting the word “English” inserted into language fields rather than the ISO standard marker for it. When I select English as the language in Scrivener’s Metadata tab, this is what I get at the top of the XHTML files:
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
If I select Spanish, I get:
<html xml:lang="es" lang="es" xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
So that’s all how it should be. But one thing I do note is that your code sample is has been edited by another program, Sigil in this case. So we aren’t really looking at what Scrivener produces.
What I see that we could do better is explicitely declaring “en” in the OPF file rather than leaving it to defaults. If you do pick something else, then the OPF is formatted correctly:
<dc:language>es</dc:language>
We should be using that with English, too, and this is a problem specific to the Windows version. I’ll make sure we have a ticket for getting that fixed.
Freeform metadata
As to the rest, at this time we don’t have plans to add a complicated freeform metadata editor like Sigil has. That might change, I wouldn’t rule it out entirely, but for now you would want to finalise the ePub in a production tool like Sigil. Scrivener at least saved you the two weeks of manual assemble of your content in it. ![]()
The Pandoc Option
I would also give consideration to use Scrivener’s alternative conversion engine, Pandoc (which you would need to install first and restart for it to pick up). It includes a much better ePub generator, if we are to look at things from the side of internal code quality, semantics and structural ease of design. If you’re looking at it from the standpoint of wanting to use a GUI to change how your heading font looks, it’s not so good for that. It expects you to bring all of your CSS with you.
But, one aspect you gain from using it is that it appears to have a fairly comprehensive amount of accessibility metadata built-in to its stock output, and what it also provides is a mechanism for inserting your own code directly into the OPF (which is what we’re using to get Scrivener’s metadata fields in there). Hence freeform metadata entry.
Such would mean not using Scrivener’s Pandoc → ePub setting, you’d have to set up the cover page, CSS file and metadata insertion file yourself, then compile the .md file and use Pandoc to generate it from these materials. But if you are inclined toward setting things up like that, it might overall be easier for you to do that then muck about in GUIs that don’t do everything you want and require you to manually click on buttons and fields every time you output. Approaches like Pandoc take more up-front setup, but once you’ve got it set up, it’s easy one-shot output from that point onward. Scrivener goes one step further and lets you set the command into your compile settings, so that it truly does become as simple as clicking the compile button once you have it set up, no matter how much automated post-processing you are doing.
See also
Further on the matter of making accessiblity-friendly ebooks, here are a couple of forum threads with discussion:
- Inserting images with alt text.
- Making better section breaks for screen readers (though note the important follow-up a few days later, where I post my conclusions on what the best combination might be for the state of ebook readers right now).