[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Multilanguage help


Subject: RE: [xsl] Multilanguage help
From: "Kaila Kaarle" <Kaarle.Kaila@xxxxxxx>
Date: Wed, 15 Feb 2006 10:45:36 +0200

I have solved the multilanguage issue like this:

I use variables like

<xsl:value-of select="$REPO_Names"/>

For multilanguage texts

My actual xsl file is tablesmain.xsl

The variables I have stored in separate files such as:

---- file english.xsl-----------------------
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:variable name="REPO_HDR" >Genealogy report</xsl:variable>
<xsl:variable name="REPO_Names" >Names</xsl:variable>
<xsl:variable name="REPO_Places" >Places</xsl:variable>

</xsl:stylesheet>

-----file suomi.xsl----------------------------

<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:variable name="REPO_HDR" >Sukuraportti</xsl:variable>
<xsl:variable name="REPO_Names" >Nimet</xsl:variable>
<xsl:variable name="REPO_Places" >Paikat</xsl:variable>

</xsl:stylesheet>

-----when using the variables in english --------

I use the tablesenglish.xsl that is

<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>
<xsl:include href="english.xsl"/>
<xsl:include href="tablesmain.xsl" />
</xsl:stylesheet>
----------------------------------------------
I have similar main xsl-files for each language


Regards
Kaarle


Ok,

I have a data XML linked to a XSL file.
This XSL file outputs the contents of that XML file (no problem).

The real problem I have is I want to output the table titles of my xsl file in
several languages (spanish, catalan, portuguese, english), and I don't want to
change from 1 only XSL file to four.


A simple example like this:
(My actual and only XSL):

         <td class="inici">Descripcion       </td>
         <td class="inici">N			    </td>


In catalan should output:

	Descripcis  | N

In english:
	Description	 | N
.
.


I hope there is a simple way to do it, and I'm thinking the best option, so I
consider you could help me (If I've explained it clearly).

Thanks


-----Mensaje original-----
De: Vasu Chakkera [mailto:vasucv@xxxxxxxxxxx] Enviado el: miircoles, 15 de
febrero de 2006 0:25
Para: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Asunto: RE: [xsl] Multilanguage help

tell us exactly what you want to do..there could be other ways of doing the
same.
give us an example of what you want.and someone would be able to suggest you

ways.


>From: "Guillem Rico" <grico@xxxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: [xsl] Multilanguage help
>Date: Tue, 14 Feb 2006 18:16:14 +0100
>
>
>Hi, I'm trying  to do a Multilanguage XSL, but I don't know how...
>
>I have a XML file (with data), and the XML is Ok translated, So I only
>need to transalte Fields of tables placed into XSL...
>
>I think I could store the translations maybe in another XML, but I
>don't know how to call the another XSL into an XSL (if I could), or
>wich is the best way to do it
>
>I don't know what to do...any ideas??
>
>I'm a XSL begginner, please if you could send some examples
>
>Thanks
>
>
>
>
>
>.
>
>.
>
>.
>
>.
>
><table border="0" cellpadding="0" cellspacing="0"
>width="90%"align="center">
>
>
><xsl:variable name="serv" select="/PICA/DATA/REGISTRE/Servicio" />
>
><tr><td align='right'><ahref="../datos/fr.html?serv={$serv}?t=t">Todos
></a>
>
><a href="../datos/fr.html?serv={$serv}?t=2">Quirzrgicos  </a>
>
><a href="../datos/fr.html?serv={$serv}?t=1">Midicos</a></td></tr>
>
></table>
>
>
>
><table border="0" cellpadding="0" cellspacing="0"
>width="90%"align="center">
>
>       <tr>
>
>                         <td class="inici"> Grd
></td>
>
>                         <td class="inici">CDM
></td>
>
>                         <td class="inici" width="3%">T     </td>
>
>                         <td class="inici">Descripcion       </td>
>
>                         <td class="inici">N </td>
>
>                         <td class="inici">PNh </td>
>
>                         <td class="inici">PNstd </td>
>
>                         <td class="inici">Nobs-Nesp              </td>
>
>                         <td class="inici">Peso
></td>       </tr>
>
>
>
>
>
>
>
>       <xsl:for-each select="PICA/DATA/REGISTRE">
>
>       <xsl:sort data-type="number" select="N" order="descending" />
>
>
>
>       <tr>
>
>       <xsl:choose>
>
>       <xsl:when test="position() &lt; '20'">
>
>       <xsl:choose>
>
>.
>
>.
>
>.
>
>.
>

_________________________________________________________________
Are you using the latest version of MSN Messenger? Download MSN Messenger
7.5 today! http://messenger.msn.co.uk


Current Thread
Keywords