XML technologies / DocBook / The DocBook XSL stylesheets / Changing localization

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

The DocBook stylesheets are localized, meaning text generated by the stylesheets, such as Kapitel for German books and Chapter for English books, is produced by a template gentext:

<xsl:call-template name="gentext">
  <xsl:with-param name="key">chapter</xsl:with-param>
  <xsl:with-param name="lang">de</xsl:with-param>
</xsl:call-template>

The call above returns the localized German string for the keyword chapter. The language is usually detected automatically rather than specified directly. The DocBook stylesheets support all common languages (see the common directory).

To generate a localized string, the function gentext needs language information. The following methods control the generated text:

How does the function gentext know where to look? See Customizing language files; first, however, we examine the simpler options.

  

  

back to top