View Single Post
Old 07-20-2022, 06:06 PM   #237
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by bookman156 View Post
So you'd add a class to that to get your words italic. In what contexts does declaring the spanned phrase as French help?
Proper HTML lang markup helps with:
  • Dictionary
    • Highlighting the French word, a device may pop up a French->English dictionary instead.
  • Translation
    • French->English translate may occur.
  • Text-to-Speech (TTS)
    • Can speak in the correct accent/model.
  • Hyphenation
    • Different languages have completely different hyphenation rules.
  • Spellchecking
    • Red squigglies.

Current, real-life use-cases?
  • Dictionary
    • Press-and-hold on a French word, get the French->English dictionary.
    • Press-and-hold on an English word, get the English dictionary.
  • Translation
    • EPUB readers, such as PocketBook, have in-line translation.
      • Similar to Google Translate on a website, PocketBook can translate and substitute, on-the-fly, the converted-to-English words.
  • Text-to-Speech
    • EPUB readers such as Thorium are able to take advantage of this. (Along with Screen Readers.)
      • French will be spoken by French TTS, English will be spoken by English TTS.
  • Hyphenation
    • While most programs only handle language at the document-/book-level, Kindles (KFX format) can currently go down to per-word.
    • LaTeX/Word/LibreOffice can also take full advantage of this.
  • Spellchecking
    • Way less red squigglies!
    • If you Right-Click a misspelled word, you may get more accurate recommendations.
    • Sigil/Calibre have the fantastic Spellcheck Lists. (Sortable, searchable lists of all words in the book + their language.)
    • Word/LibreOffice can also take advantage of this.

I've written about each of these things extensively. Most recently, see 2021: "Add xml:lang to ePub".

There are always new tools/updates happening. Things have gotten MUCH better on each of these fronts, even within the past few years.

(For example, because of my consistent nudging since 2016, Multi-Language Spellchecking is now a thing in both Sigil/Calibre.)

If you marked your HTML languages properly, boom, you automatically benefit from each of these enhancements as they come along.

Last edited by Tex2002ans; 07-20-2022 at 08:37 PM.
Tex2002ans is offline   Reply With Quote