Click here to Skip to main content
16,012,153 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I have 100+ xslt files which i used as templates. If i need to display the xslt in different language say Spanish how can i achieve that? I have one xml file from which 100+ xslt files are created to display the contents... Do i need to create resource files for each xslt? Is there any other approach?

Thanks.
Posted
Comments
Sergey Alexandrovich Kryukov 10-Jun-13 14:27pm    
Display XSLT itself or XML processed (transformed) with XSLT?
—SA
vidkaat 10-Jun-13 15:15pm    
When you display xslt itself you mean to say convert xslt file in english to another xslt file in spanish?I am not sure what u r asking?
Sergey Alexandrovich Kryukov 10-Jun-13 15:46pm    
No, I mean XSLT is used to transform some XML file to something, so three files are involved. What should be globalized?
—SA
vidkaat 10-Jun-13 16:06pm    
Sir,
Can the xml be globalized? I am very new to Globalization....I want the end result to be in Spanish. Globalizing the xslt file is painful i think because there are 100+ xsl files. I would like to know your suggestion on this. Thanks for ur time?
Sergey Alexandrovich Kryukov 10-Jun-13 16:16pm    
Not the XML itself. I don't think there is a dedicated mechanism just for XML. It can be globalized in wider context, as a part of some globalized application.
And creation of many localized files is still unavoidable. There is no such thing as miracle. Automatic translation? hardly, best modern translator does not cope with such tasks, at best, they could only be used to assist a qualified human translator.

See also:
http://www.gala-global.org/localization-term/xslt-0
(But it won't provide a solution.)

(By the way, you did not answer my question, but I can guess what's involved...)
—SA

1 solution

Please see my comments to the questions. It depends on your scenario; and you did not yet answer to my questions about it.

However, in all cases, if your XMLs (XSLT or other) should be globalized, it means that you need to put all "fixed" XML in the project resources; and your runtime would need to use those resource. You cannot avoid writing XMLs in different versions for different cultures. For each localization, you will need to write resource-only assemblies separately and put all localized XMLs there. Such assemblies would work as satellite assemblies and would be selected automatically when your application thread(s) change culture.

You can read about this mechanism here:
http://msdn.microsoft.com/en-us/library/aa292205%28v=vs.71%29.aspx[^],
http://msdn.microsoft.com/en-us/library/sb6a8618%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/21a15yht.aspx[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900