![]() |
#16 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Maybe the thread SHOULD go in Conversions. I manually work around the disparate <html...> lines in the Editor by either a search and replace or by simply copying/pasting (if I remember -- and, unfortunately, that remembering is an issue). So, that's why I started this thread here. But, I guess I'd prefer something to happen during either conversion or polishing to set those lines everywhere (either with Conversion/Polish settings or by setting up a template as I mentioned in my second post.
OTOH, if a template is set under the editor's Preferences > Editor Settings, I'd think that if the Editor re-creates a deleted file (like toc.ncx or toc.xhtml), the settings in that template should be used. But, I could be wrong. |
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Is it a requirement to set the language on each and every xhtml page?
If yes, why doesn't EpubCheck flag this as a warning when it is missing? I though the language was picked up from the opf file. |
![]() |
![]() |
![]() |
#19 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,175
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You dont need the lang in every html file. The spell checker will use the lang from the OPF file when an html file does not have a lang.
|
![]() |
![]() |
![]() |
#20 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,226
Karma: 5390614
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Thanks @kovidgoyal
That's what I thought also. |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Yes. "Exclude Files" at the bottom of the spellchecker page. I've tested it by telling it to exclude nav.xhtml, toc.xhtml and toc.ncx and that works well.
|
![]() |
![]() |
![]() |
#22 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Quote:
In the content.opf file, I found the dc:language entry and changed it to: Code:
<dc:language>en-US</dc:language> |
|
![]() |
![]() |
![]() |
#23 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,175
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont follow. If you want to always use the US variant for en you do so by configuring spell check in the editor preferences, to use the US variant as the default for the EN language.
|
![]() |
![]() |
![]() |
#24 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
The problem is that I've begun setting the specific variety of English. For American English books, I use en-US. For British English books, I use en-br en-GB. When I was leaving things with the generic EN tag, there was no problem. But, once the html/xhtml files have either en-us or en-br en-GB set, the spellchecker will occasionally choke when it runs into a duplicate misspelled word in a file where the tag is set by default to the generic en, but the rest of the files are set to the specific regional flavor of en.
The work-arounds are to 1) manually change the lang= tags when the problem pops up in the spellchecker or 2) exlcude those particular file (usually nav.xhtml, toc.xhtml and toc.ncx - but I've occasionally had the issue with content.opf when I've misspelled words in my included metadata). Currently, amongst the last things I do before spellchecking is do a Search/Replace across all text files something like: Code:
Search: <html.+?> Replace: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-us" xml:lang="en-us"> That works well. It would be nice, though, if all files that get re-created in the Editor (i.e., the toc and nav files) would follow the language set (if any) in the template at Preferences > Editor Settings > Templates for New Files. Also, (but, I don't know if it's really reasonable) it might be nice if the language could be set throughout all files in a book at conversion time. Last edited by enuddleyarbl; 02-14-2023 at 04:25 PM. |
![]() |
![]() |
![]() |
#25 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,162
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
isn't it en-GB for the British Isle?
|
![]() |
![]() |
![]() |
#26 |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,062
Karma: 89198465
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
For anywhere using British English, or close to it. Obviously Ireland and New Zealand use very close to British English, South Africa, Australia, India, Canada less so.
GB = Great Britain. Brittany in France used to be Little Britain. GB is technically only Scotland, Wales, England and Cornwall. The Scottish Islands, Isle of Wight, Northern Ireland and Rathlin Island (Northern Ireland) are all both in the British Isles and the United Kingdom of Great Britain and Northern Ireland (full title). Isle of Man (English & Manx language) and Channel Islands (English, French and a sort of Norman French language) are British territories, but not in UK or GB, though in the British Isles. Ireland, the nation state, and its islands are in the British Isles. Oddly The Irish Republic is a customary title, it's Ireland in English and only Éire in Gaelic. The area was called the British Isles before England even existed, but some now call them the Anglo-Hibernian Isles, or in the Anglo-Irish Agreement, "These Islands". The UK was created only in 1800 as The United Kingdom of Great Britain and Ireland, though the Pope gave Ireland to English/Norman King Henry II in the 12th Century (The Normans conquered England in 1066). In 1922, when the UK part of Ireland was reduced to 6 of the 9 Ulster Counties, Westminster seriously considered becoming just Great Britian but renamed to the United Kingdom of Great Britain and Northern Ireland. |
![]() |
![]() |
![]() |
#27 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Eeeek. I think I grabbed en-BR from an Agatha Christie book. But, I can't guarantee that's a true statement. If I look at:
https://www.iana.org/assignments/lan...ubtag-registry and search for "subtag: br" the best match is Brazil. Oops. If I search for "subtag: gb" I find: Type: region Subtag: GB Description: United Kingdom Added: 2005-10-16 Comments: as of 2006-03-29 GB no longer includes the Channel Islands and Isle of Man; see GG, JE, IM I've got to fix my stuff. Thanks for the heads up. |
![]() |
![]() |
![]() |
#28 | |
the rook, bossing Never.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,062
Karma: 89198465
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Quote:
The really stupid thing is websites and programs using National Flag Icons to designate language. German, French, English, Spanish and Portuguese are official languages outside of Germany, France, UK or USA, Spain and Portugal. English (Ireland) is a real setting, but so badly supported it's better to select English (British) and edit the Regional Settings (€ rather than £, technically both are metric, but Ireland more so with Km rather than Miles on signs and litres of fuel rather than gallons). Occasionally USA is the only working choice, despite different gallons to UK, Fahrenheit, unique date systems, Letter rather than A4, USA cups and pounds rather than UK Stones, Pounds, Ounce and Webster's reformed anti-French spelling). Last edited by Quoth; 02-14-2023 at 02:59 PM. |
|
![]() |
![]() |
![]() |
#29 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
I guess I can't blame Agatha for en-BR. It looks like it was just a senior moment on my part that I automated. <sigh>. I used the Quality Check plugin to search for lang="en-gb" and lang="en-br" in my library. My older ones all use en-gb. Only in the last couple of weeks does en-br show up. Oh, well. It keeps me occupied.
|
![]() |
![]() |
![]() |
#30 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,784
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
PM David Lange made Māori an official New Zealand language, he was a contemporary of Thatcher so that would have been in the 1980s. The current government has set an objective for te reo Māori to be taught in all primary schools by 2025. BR |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add xml:lang to ePub | abraum | ePub | 11 | 06-25-2021 06:06 PM |
Add Read/Unread metadata from custom column to metadata jacket | allanahk | Library Management | 4 | 11-12-2018 03:10 PM |
Stop overwriting metadata jacket on conversion (instead add another one)? | allanahk | Calibre | 2 | 11-11-2018 04:21 PM |
Add Copyright to Book Jacket | Axell | Conversion | 4 | 03-23-2017 03:16 AM |
Any way to add Book Jacket w/ Save to disk? | djrm | Calibre | 3 | 08-17-2010 11:52 AM |