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

Re: XSLT (2) namespace safe i18n patterns

Subject: Re: XSLT (2) namespace safe i18n patterns
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 24 Nov 2009 12:40:01 +0000
Re:  XSLT (2) namespace safe i18n patterns
>> For example, in the above example, you could just have:
>
>> <name>medical_doctor</name>
>
>> where "medical_doctor" is the key for a lookup into your
>> translations, which are held in separate files.
>
>  That's a good pattern I think, but I guess there is room for
> several approaches, depending on the real problems.  But even
> there, in order to "lookup into your translations", you need to
> tag them with their respective languages.

I would group the translations by area, with a suitable suffix (just
like Java :) for example:

helppage_en_GB.xml
helppage_de_DE.xml

Then you can easily distribute the relevant files to each translator
at the same time, add/remove them as needed, edit individual files
without fear of affecting the others, fall back to the appropriate or
default file when a translation is missing etc... all lots of benefits
over storing everything in a single file.

> I cannot see why @lang
> would be better than @xml:lang.

The reason is that with xml:lang you must adhere to that spec, with
@lang you are free to do what's best for your situation.  You could
have @lang="en_GB", or you could have @lang="English" or @lang="1",
whatever best suits the situation it is being used for.  It's the same
argument for using proprietary markup to describe links betweens
documents, rather than using xlink.





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

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.