Simple Strings

Translated strings are extracted in the stylesheets by a template called l10n.gettext. This template extracts strings from an XML file, which is built from PO files by intltool. For example, consider the string Caution, which is used as a heading for caution elements. The stylesheets would call l10n.gettext to extract the translated value of this string for the document's language. The l10n.xml file would have an entry similar to this:

<msgset xmlns=""http://www.gnome.org/~shaunm/gnome-doc-utils/l10n">
  <msgid>Caution</msgid>
  <msg>Caution</msg>
  <msg xml:lang="ar">إنتباه</msg>
  <msg xml:lang="bg">Внимание</msg>
  <msg xml:lang="ca">Compte</msg>
  <msg xml:lang="cs">Upozornění</msg>
  <msg xml:lang="da">Forsigtig</msg>
  <msg xml:lang="de">Achtung</msg>
  <msg xml:lang="el">Προσοχή</msg>
  <msg xml:lang="en_CA">Caution</msg>
  <msg xml:lang="en_GB">Caution</msg>
  <msg xml:lang="es">Precaución</msg>
  <msg xml:lang="et">Ettevaatust</msg>
  <msg xml:lang="fi">Varoitus</msg>
  <msg xml:lang="fr">Attention</msg>
  <msg xml:lang="gu">સાવધાન</msg>
  <msg xml:lang="hi">चेतावनी</msg>
  <msg xml:lang="hu">Figyelem</msg>
  <msg xml:lang="id">Perhatian</msg>
  <msg xml:lang="it">Attenzione</msg>
  <msg xml:lang="ja">注意</msg>
  <msg xml:lang="ko">주의</msg>
  <msg xml:lang="lt">Įspėjimas</msg>
  <msg xml:lang="nb">Advarsel</msg>
  <msg xml:lang="ne">सावधानी</msg>
  <msg xml:lang="nl">Let op</msg>
  <msg xml:lang="no">Advarsel</msg>
  <msg xml:lang="pa">ਸਾਵਧਾਨ</msg>
  <msg xml:lang="pt">Cuidado</msg>
  <msg xml:lang="pt_BR">Cuidado</msg>
  <msg xml:lang="ro">Atenţie</msg>
  <msg xml:lang="sk">Výstraha</msg>
  <msg xml:lang="sq">Kujdes</msg>
  <msg xml:lang="sr">Пажња</msg>
  <msg xml:lang="sr@Latn">Pažnja</msg>
  <msg xml:lang="sv">Varning</msg>
  <msg xml:lang="tr">Uyarı</msg>
  <msg xml:lang="uk">Застереження</msg>
  <msg xml:lang="vi">Cảnh báo</msg>
  <msg xml:lang="wa">Adviertance</msg>
  <msg xml:lang="zh_CN">小心</msg>
  <msg xml:lang="zh_TW">注意</msg>
</msgset>

Translators, however, will work only with the PO files. Using PO files for these strings is no different than any other simple string translation. The PO entry in the sr locale for the above string would look like this:

#: ../xslt/gettext/l10n.xml.in.h:1347
msgid "Caution"
msgstr "Пажња"