Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2007, 06:36 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default xslt multi language

I am trying to make my xslt for multiple languages, what i do is i load in a text using this :

<xsl:value-of select="$lang.home/translations/info[lang($language)]/title"/>

this grabs the 'title' from the page 'home' with the current language.

This works ok, accept that inside this text (wich is in multiple languages) I have a link to another page (the contact page). This link is built up in xml so that I can apply the same template for each link.
The xml for this link doesn't get transformed by xml, the tags just disapear.

Am I getting my internationalization wrong, or is there an other tag that I should use instead of value-of? I tried using copy-of instead wich give me the tags, but they are just placed in the output like they were in xml (no transformations done)

Any help is apreciated

 
Old October 26th, 2007, 06:43 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

From your description it sounds as if you should be replacing <xsl:value-of select=""> with <xsl:apply-templates select="">.


Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old October 26th, 2007, 06:50 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much for helping out this newbie :D that worked like a charm!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Language Database nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 December 26th, 2007 02:41 AM
Multi-language website: almost there electricspace ASP.NET 2.0 Basics 0 July 28th, 2007 06:21 PM
Multi language scenario edgarw BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 May 7th, 2007 08:08 AM
Multi-language Lofa ASP.NET 1.0 and 1.1 Basics 2 October 25th, 2005 04:10 AM
Multi-Language version Gjerstad BOOK: ASP.NET Website Programming Problem-Design-Solution 2 July 18th, 2003 05:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.