39.1.6 Understanding how language templates are organized

Your DITA2Go distribution includes the language configuration templates and files listed in Table 39-8. The top-level DITA2Go general configuration template, d2g_config.ini, references the editable English language configuration file: local_d2g_lang_en.ini:

[Templates]
Languages = %OMSYSHOME%\d2g\local\lang\local_d2g_lang_en.ini

If you expect to produce output in English, because the English language file is referenced from the DITA2Go general configuration chain, you do not have to include a setting for Languages in your starting project configuration file. However, to produce output with labels and headings in German (for example), in your project configuration file you would include the following setting:

[Templates]
Languages = %OMSYSHOME%\d2g\local\lang\local_d2g_lang_de.ini

You can copy any of these language templates and modify the copy to create a regional language variation. Give your new language template a name of the form d2g_lang_LLRR.ini, where: 

LL

is the language abbreviation (such as en for English)

RR

is the optional region abbreviation (such as us for United States).

To determine an appropriate abbreviation, see:

http://www.w3.org/TR/REC-html40/struct/dirlang.html

http://www.ietf.org/rfc/rfc1766.txt

For example, to provide regional differences for the English language, you could prepare the following variants:

local_d2g_lang_enus.ini

United States

local_d2g_lang_enuk.ini

United Kingdom

local_d2g_lang_enoz.ini

Australia

local_d2g_lang_ennz.ini

New Zealand

Your project configuration file could reference one of these variants; each variant should point in turn to d2g_lang_en.ini for common values.

Within a referenced language configuration template you can include another [Templates]Languages setting, to make a chain of language configuration templates to be searched; the chain can be any length. However, all files in the chain must have distinct names; the chain stops if DITA2Go finds a repeat. See §39.2 Referencing configuration files and templates.

See §8.10 Localizing output headings, labels, and names.

Previous Topic:  39.1.5 Understanding how format templates are organized

Next Topic:  39.2 Referencing configuration files and templates

Parent Topic:  39.1 Working with configuration templates

Sibling Topics:

39.1.1 Understanding how templates are organized

39.1.2 Understanding how templates are named

39.1.3 Understanding how templates are chained together

39.1.4 Understanding how macro libraries are organized

39.1.5 Understanding how format templates are organized