Re: [xsl] Simple (external XML) internationalization with XSLT?

Subject: Re: [xsl] Simple (external XML) internationalization with XSLT?
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Mon, 03 Oct 2005 18:00:33 +0200
Interesting but, cannot this be done without so much writting in each
i18n call? Can't it be simplified? Isn't there other method?

Cannot I write something like this?:

<i18n:text key="1" />

And transform it automatically to:

<xsl:value-of select="document('en-US.xml')//i18n:language/i18n:hash-list/i18n:string[@key='1']"
/>

You can put use a variable:


<xsl:variable name="i18n-strings" select="document('en-US.xml')//i18n:language/i18n:hash-list/i18n:string" />

<xsl:value-of select="$i18n-strings[@key = '1']" />

Cheers,
Geert

Current Thread