[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xslt and i18n

Subject: Re: xslt and i18n
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Thu, 05 Feb 2009 11:43:55 +0100
Re:  xslt and i18n
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Welch wrote:

> 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.

I think that replacing all literal texts inside template by xsl:value-of
and function call is overkill and it makes stylesheet less readable.

To overcome this limitation I have integrated Gettext library into Saxon
some time ago:

http://xmlguru.cz/2006/10/saxon-gettext

			Jirka

- --
- ------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@xxxxxxxx      http://xmlguru.cz
- ------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
- ------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJisLrzwmSw7n0dR4RAg/pAJ9if2971/P37zKL1C9oj8gif/ZksACgkhLt
sBduAv/6+OsRupBRQJuQg0M=
=ekds
-----END PGP SIGNATURE-----

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.