OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook] Localization - How to overwrite a single property in all 45 languages


I'd write an xslt to run on common/l10n.xml in the DocBook distribution.
First you would have a template that writes out the local l10n stuff:

<xsl:template match="/">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:fo="http://www.w3.org/1999/XSL/Format";
                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0";
                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";

                exclude-result-prefixes="doc"
                version='1.0'>

<xsl:param name="local.l10n.xml" select="document('')"/>

<i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0";>

<xsl:apply-templates/>

</i18n>

</xsl:stylesheet>
</xsl:template>

You would have a template that matches l:l10n and writes out a new local
l:l10n element for each language that contains your change:

<xsl:template match="l:l10n">

 <l:l10n language="{@language}">
     <l:context name="xref">
         <l:template name="section" text="%t"/>
     </l:context>
 </l:l10n>

</xsl:template> 

Or something like that. Now import or include the result of that in your
customization layer. It will replace whatever l10n stuff you have so
you'll have to merge in any other changes you have for particular
languages. 

If you've already got a local.l10n.xml param in your customization
layer, delete it or make it point to the generated file.

Make sense?

David

> -----Original Message-----
> From: Tobias Anstett [k15t.com] [mailto:tobias@k15t.com] 
> Sent: Wednesday, April 15, 2009 6:47 AM
> To: docbook@lists.oasis-open.org
> Subject: [docbook] Localization - How to overwrite a single 
> property in all 45 languages
> 
> Hi,
> 
> Does anybody know how to overwrite a gentext value for all 45 
> languages? It would be very displeasing to do it manually...
> 
> <l:l10n language="XXXXXXXX">
>     <l:context name="xref">
>         <l:template name="section" text="%t"/>
>     </l:context>
> </l:l10n>
> 
> Cheers,
> Tobias
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]