User Tools


Language tagging

If the book contains multiple languages, you'll need to double-check that:

  • the correct language tags are applied to inline text
  • the correct language attributes are inside the metadata <head> section

Inline text

The Save-As-DAISY plugin will insert <span> tags around the inline foreign language text. You'll need to add the language attribute to these span tags. You can do this with a bulk find and replace (regex) operation. For example:

Find: <span
Replace: <span xml:lang="es"

The above regex will add a Spanish language attribute to all span tags in the book. This assumes that all secondary language in the book is Spanish. If there are multiple foreign languages in the text then you'll need to manually apply the language attributes to each span tag.

The <head>

If there are two languages in the book (say, English and Spanish) then the <head> section will contain the following metadata:

<meta content="en" name="dc:Language"/>
<meta content="es" name="dc:Language"/>

Language codes

To determine the correct language code, use the ttsbuilder.xml as a guide. If you're using a Mac, you can see the language codes in the last section of the file called Mac OS X.

If the language is not listed in the ttsbuilder, then check if the language can be installed on your operating system. To check on a Mac:

  • Go to System Preferences > Dictation & Speech > Text to Speech
  • Under the System Voice drop-down menu, scroll to the bottom and select Customize
  • Search for the language
  • If the language exists, then let the Content Coordinator know. It will need to be added to the ttsbuilder.xml.

If the language is not built-in to your operating system, then locate and use the official language code here.


Further reading for the interested: Choosing language tags (W3C)

public/nnels/daisy/edit-xml/language.txt · Last modified: 2019/05/04 00:38 by farrah.little