Translating the Stylesheets

The Gnome documentation stylesheets provide support for localizing the rendered output from DocBook documents. Localizable strings in the stylesheets are marked for translation and extracted into PO files and intltool. After they have been translated, intltool merges them into an XML file called l10n.xml, which is then used by the stylesheets to localize the output.

Providing full internationalization support for the DocBook stylesheets is not trivial, and providing localizations requires translators to understand how documents are formatted and, to some extent, how DocBook works. DocBook is a high-level markup language, and it requires processing applications to provide much of the formatting for documents. DocBook applications must resolve cross references, create tables of contents, format headers, and perform other formatting tasks that need to be localized. Localizing these tasks involves more than translating stand-alone sentences. In effect, the very formatting code itself is localizable.

Help Us Help You

Document formatting varies greatly across the world. Each locale has a long history of formatting conventions and methods. The maintainers of these stylesheets do not know all the nuances of formatting documents in all locales. The only way we can create better output for your locale is if you tell us when you encounter problems.

Although all localization is done by translating strings in a PO file, there are many cases where the translatable string is not a simple sentence or phrase. Rather, translators must provide data using XML fragments. These structured fragments can be used to work with plural forms, provide alternative formattings based on context, or provide format strings.