[xsl] xslt and i18n

Subject: [xsl] xslt and i18n
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Thu, 5 Feb 2009 09:54:36 +0000
Hi all,

Has anyone any thoughts on internationalisation of xslt:

- are there any existing libraries or techniques you can recommend?

- should xslt even be involved in i18n, or should that be left to the
generated language (eg xhtml)?

- if it's done in the language, should it be inbuilt into the
processor? (or in future, the language itself like JavaFX?)

As an example, say you're outputting an xhtml title that you'd like to localise:

<title>The English Title</title>

I would image it would be straightforward to implement my own i18n
solution, something like:

<title>
  <xsl:value-of select="fn:getLocalisedValue('page.title', 'The
English Title', 'de_DE')"/>
</title>

where the arguments are token key, default value and locale.

Any thoughts?

thanks
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread