Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: change website language dynamically using XML and XSL change website language dynamically using XML and XSLTo: NULL Date: 11/30/2007 9:37:00 PM Hi. I have the following problem. I want to apply different languages for 1 page, depending from a (by the user selected) parameter. I have an index page (index.xml), which uses a xsl template. Let's say, that the default language for this index page is english.. On the page there are few flags with links to the same page (again index.xml), but with a different language. Is there any way to do this. The easiest solution is to make a separate index page for all languages (e.g. index_en.xml, index_ger.xml etc.) and specify the language as an attribute. However I dont like this solution. I tried passing parameters to the index page (e.g. index.xml?lang=en), and then get the parameter with javascript. This didn't work out, because when JS is ran, the HTML is already generated, and there is no way to pass a variable from JS to XSL at this point. Then I came up with another solution, but I have no idea, if this is possible. Let's say that the index.xml has the following structute: <?xml-stylesheet type="text/xsl" href="index.xsl"?> <root lang="en" page="index"> <index /> </root> Is there any way to change the lang attribute somehow from the XSL template? Thanks in advance. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
