This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How to customize localized text within the XSL-Stylesheets?



> Put something like this in your XSL customization file:
> 
> <xsl:param name="local.l10n.xml" select="document('')"/>
> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";;>
>   <l:l10n language="de">
>     <l:gentext key="nav-next" text="N&auml;chste Seite"/>
>     <!-- other customizations here -->
>   </l:l10n>
> </l:i18n>
> 

Very nice. I was afraid I'd have to modify entire context blocks, which are
more complicated than the gentext example above. But apparently you can
isolate individual templates in context, as below:

      <!--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
      <!--  customizations to common\I10n.xsl
            Remove inappropriate generated text for chapters, section
-->
      <!--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
  <l:l10n language="en">
    <l:gentext key="revision" text="Version"/>
    <l:gentext key="Revision" text="Version"/>
    <l:context name="title">
      <l:template name="chapter" text="%t"/>
    </l:context>
    <l:context name="xref">
      <l:template name="chapter" text="%t"/>
    </l:context>
    <l:context name="section-xref">
       <l:template name="section" text="%t"/>
    </l:context>
  </l:l10n>
</l:i18n>



----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]