Localization in Stylesheets

DITA and Docbook stylesheets come with localizations so that you can change the language of the element content. For example, you can change the label on the <figure> element from the English "Figure" into the Spanish "Figura".

Figure 1. Spanish localization of the Figure element label.



The language of the element content is controlled by the value of the xml:lang attribute. Possible values include:

The allowed xml:lang values are based on ISO-3166 Country Codes and RFC 3066 Language Codes (see W3C: Language tagging in HTML and XML).

You can change the language either of an element or of all elements in a document:
Related information
Default Stylesheet
Docbook Stylesheet