多种语言的Windows应用程序(本地语言) [英] Windows application in multi language(Local Language)

查看:117
本文介绍了多种语言的Windows应用程序(本地语言)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Frnds,
我需要开发一个多语言项目.我的意思是,如果我们选择英语,则总项目将转换为英语,例如法语,然后完全转换为法语.

请为此提供一些想法!如果您有任何链接,请给我发送!


我知道,这是可能的,我们必须为此使用ini文件或将其存储在sql server中,我们的项目详细信息是指每种表格,标签,按钮名称均使用我们的本地语言存储.在病房之后,当我们运行项目时,该时间将从服务器中取出.


但是我不知道这是否是正确的解决方案.因此,请提供一些细节.
请对我来说非常紧急.


help mee

Hi Frnds,
i need to develop a multi language project. i mean, if we select English then total project is convert to English, like French then totally convert to French.

Please give some idea for this! and if you have any link for this, please send me!


i know,it is possible, and we have to use ini file for this or stored in sql server our project detail i mean every forms, labels,buttons names are stored with our local language. after wards when we run our project that time retrive from out server..


But i don''t know this is correct solution or not. So Please Give Some Detail.
Please its very urgent for me..


help mee

推荐答案

所有这些技术都在.NET中得到了很好的展示.您用英语创建了所有资源,而不是使用UI的单个字符串常量.它提供了全球化: http://msdn.microsoft.com/en-us/goglobal/bb688139 [ ^ ],http://msdn.microsoft.com/en-us/library/401dkz3c.aspx [http://msdn.microsoft.com/en-us/library/ms788718.aspx [ http://msdn.microsoft .com/en-us/library/21a15yht.aspx [ ^ ].它们使用fallback进程工作: http://msdn.microsoft.com/en-us/library/sb6a8618.aspx [ ^ ];会自动找到与所需区域性最接近的区域性的卫星程序集.

现在,该应用程序的最终呈现方式简化为所需区域性的选择,可以在运行时自动,动态地进行选择.另一个选项是在应用程序配置文件中选择区域性,并允许用户对其进行编辑.请参阅System.Threading.Thread.CurrentCultureSystem.Threading.Thread.CurrentUiCulture.

注意:.NET应用程序(线程)区域性不依赖于系统区域设置,可以随时更改(当然,字体应能够呈现所需的Unicode代码点子集).

重要的实践要点是灵活的UI设计,而不依赖于不同语言的文本指标.这可能需要认真的经验.

还有更多内容:日期/时间,货币,数字格式:所有这些表示方式都可能需要与文化有关,因此应使用当前的文化进行格式化.

—SA
All this technology is well presented in .NET. You created all resources in English, not using a single string constant for UI, all in resources. It provides Globalization: http://msdn.microsoft.com/en-us/goglobal/bb688139[^], http://msdn.microsoft.com/en-us/library/401dkz3c.aspx[^], http://msdn.microsoft.com/en-us/library/ms788718.aspx[^]. Later, you can add resources for other languages without re-touching original project, is special localization projects. The localized resource should be compiled in Satellite Assemblies: http://msdn.microsoft.com/en-us/library/21a15yht.aspx[^]. They work using fallback process: http://msdn.microsoft.com/en-us/library/sb6a8618.aspx[^]; the satellite assembly with the culture closest the the required culture is found automatically.

Final presentation of the application now is reduced to selection of required culture, which can be done automatically and dynamically, during run-time. Another option is to select culture in application configuration file and allow the user to edit it. See System.Threading.Thread.CurrentCulture and System.Threading.Thread.CurrentUiCulture.

Note: .NET application (thread) culture does not depend on system locale and can be changed at any time (of course the fonts should be able to render required Unicode code-point subset).

Important practical point is flexible UI design, not depending on text metrics in different languages. It may take serious experience.

There are more to it: date/time, currency, numeric formats: all these presentation aspects may be required to be culture-dependent, so they should be formatted using current culture.

—SA


这篇关于多种语言的Windows应用程序(本地语言)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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