cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cenk Uysal <cenk_uy...@yahoo.com>
Subject Internationalization without i18n
Date Fri, 03 May 2002 12:35:04 GMT
Hi,

I want to prepare a site which I will serve both in English and
Turkish language. So I want to use a way of serving my site in
different languages but without using i18n property of Cocoon.
Because I think this technology is in stage of development. Thus I
think I will use a method such like this:

This is the XML document example:

<?xml version="1.0"?>
<personnels>
  <personnel>
    <name>Cenk</name>
    <surname>Uysal</surname>
    <title lang="tr">Arastirma Gorevlisi</title>
    <title lang="en">Searching Assistant</title>
  </personnel>
</personnels>
And this is the XSL file:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
 <html>
 <body>
  <table border="2">
   <tr>
    <th>Name</th>
    <th>Surname</th>
    <th>title</th>
   </tr>
   <xsl:for-each select="personnels/personnel/title[@lang='any lang
attribute']">
   <tr>
    <td><xsl:value-of select="name"/></td>
    <td><xsl:value-of select="surname"/></td>
    <td><xsl:value-of select="title"/></td>
   </tr>
   </xsl:for-each>
  </table>
 </body>
 </html>
</xsl:template>
</xsl:stylesheet>
But with this method I always have to pass the language attribute. I
don't want to pass it as a parameter after the address of the file
such as: http://localhost/cocoon/personnel/personnel.xml?param=en

I saw a method for parameter passing in Amazon.com website. It was
like this:

http://www.amazon.com/parameters_here/file_requested

That means parameters were in address but as a directory name. May I
do this by Cocoon? Or do you have any idea of passing parameters for
internationalization? What about i18n? Do you think it is useful? 

Thanks for your helps...

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message