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

Re: Multi-lingual website

Subject: Re: Multi-lingual website
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Tue, 7 Aug 2001 10:55:21 +0100
xsl lang multi
i have just finished a voyage into multi-lingual sites, i have built in my
final thoughts into our oIcore framework ( www.on-idle.com )

some thoughts;

ask yourself what changes more the data or the layout of the data, this will
guide your decision to making your process xslt centric or xml centric,
believe me when u get up to a thousand pages it makes a difference.

if u want seperate xml files for text assets using the @xml:lang attributes
to differentiate xslt processing i would suggest having a global template
that matches asset
something like:

<textasset name="asset1">
<txt xml:lang="en">this is english</txt>
<txt xml:lang="fr">this is french</txt>
<txt xml:lang="de">this is german</txt>
</textasset>

use a top level global param for all stylesheets <xsl:param name="lang"
select="'en'"/>,in your case this param is passed to your xslt from ASP (
goto www.bayes.co.uk/xml to find out how to do this).

using a named template adds up to a lot of extra keystrokes instead i use
something like <xsl:apply-templates select="txt[@name='asset1']"/>
everywhere in conjunction with;

<xsl:template match="txt">
<xsl:if test="@xml:lang=$lang">
<xsl:copy-of select="node()" />
</xsl:if>
</xsl:template>


in real life i followed this formula but still ended up having 3 seperate
versions of the site, because essentially multi-lingual sites requires 2
layers of abstraction to make content management easy as well as dealing
with layout concerns. in smaller sites this is not the case, in larger sites
where pictures and language length become a concern u will probably have to
go down this route.

another tip is that u will find that if u have one large text file with all
assets, processing these assets will become an issue if u are doing
transforms into real time.

there are ways of optimising this process, especially with the nomenclature,
esp replacing the rather lengthy apply-templates select using variables, but
i leave that to u.

good luck

cheers, jim fuller

----- Original Message -----
From: "Daniel Newman" <daniel.newman@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "Neil O'Connell" <neil@xxxxxxxxxxx>
Sent: Tuesday, August 07, 2001 10:27 AM
Subject:  Multi-lingual website


> I've just read the posting by Sher, and the reply by BeNj, which goes some
> way towards answering my question, but is it possible for me to create XML
> files, responsible for each page within the web site, and including
> multi-languages, and then to have one XSL file that converts it into the
> chosen language.
>
> Obviously most of this is quite possible an already in the FAQs, but if I
> have chosen to look at the French site, my first page will get the XML
> (index.xml lets say), and will transform it with the appropriate XSL file
> (although assuming every page is the same, we may only need one, getting
all
> info from the XML such as images etc.), but can I pass the chosen language
> parameter from my ASP processing page direct to the XSL, or would it be
> better to have three (assuming three languages) XSL files, selected by the
> ASP?
>
> Thanks for your thoughts,
>
> Daniel Newman.
> Bis-Web Ltd.
> Tel: 01993 880614
> Fax: 01993 881625
>
>
****************************************************************************
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the
> material from any computer.
>
****************************************************************************
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.