xslt的全球化 [英] globalization of xslt

查看:74
本文介绍了xslt的全球化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有100多个xslt文件用作模板。如果我需要用不同的语言显示xslt说西班牙语怎么能实现呢?我有一个xml文件,从中创建100多个xslt文件来显示内容......我是否需要为每个xslt创建资源文件?还有其他方法吗?



谢谢。

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.

推荐答案

请参阅我对问题的评论。这取决于你的情况;你还没回答我的问题。



但是,在所有情况下,如果你的XML(XSLT或其他)应该全球化,那就意味着你需要将所有固定XML放在项目资源中;并且您的运行时需要使用这些资源。您无法避免为不同的文化编写不同版本的XML。对于每个本地化,您将需要单独编写仅资源程序集并将所有本地化XML放在那里。这样的程序集可用作附属程序集,并在您的应用程序线程更改文化时自动选择。



您可以阅读此内容机制在这里:

http:// msdn .microsoft.com / zh-CN / 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
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


这篇关于xslt的全球化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆