全球化在现有的Windows窗体应用程序?窗体、应用程序、Windows

2023-09-04 01:46:10 作者:9.凭栏落花侧

我已经开发了一个现有的WinForms应用程序中使用VS 2005和.NET Framework 2.0。

I have an existing winforms application developed using VS 2005 and .net framework 2.0.

现在我们需要全球化这个应用程序。这两个区域设置是德国和日本。

Now we need to globalize this application. The two locales are German and Japanese.

我知道我们可以用形成的本地化属性,以创建本地化表单资源,可以有其他资源文件在消息框中使用的字符串,异常等。

I know we can use form's localize property to create localized form resources and can have other resource files for strings used in message boxes, exceptions etc..

我想知道全球化现有应用程序的最佳方法,我应该设置本地化属性每份表格上还是​​有应采取的日期格式的一些工具,这将提取标签名称和控制names..what注意事项,货币等。

I want to know the best approach to globalize an existing application, should I set the localize property on each form or is there some tool which will extract the the label names and control names..what considerations to be taken for date formats, currency, etc.

此外,我们已经在code一些地方Concat的消息字符串中使用的一些复合弦线,如何将这些可以本地化?

Also we have used some composite strings in some places in code to concat the message strings, how these can be localized?

我们将应用程序迁移到VS 2008和.NET Framework 3.5的全球化开始活动之前。

We will be migrating the application to VS 2008 and .net framework 3.5 before starting globalization activity.

推荐答案

我只曾与LTR的语言,我没有触及日本。考虑到这一点,这里是我的一些最佳做法,把我的头顶部:

I've only worked with LTR languages, and I haven't touched Japanese. With that in mind, here are some of my best practices off the top of my head:

将所有的语言,具体的方案字符串和字符串碎片进入一个.resx文件(我喜欢用每个对话框框选择一个.resx文件),然后调用使用自动生成的类和属性字符串。不应该有留在你的code(这意味着在你的code几乎没有琴弦,期限)任何特定语言的字符串。一个很好的模式是把格式化字符串到的.resx为好,因为语言的语法各不相同。 设置的所有表单的本地化属性为True,使特定语言的变化上有直接(使用语言属性)。 在设计你的窗体,使任何显示特定语言的字符串在需要的地方将有额外的空间(注:德国长于英语)。国际海事组织,形式不应该被完全重新安排在语言中的基本变化 - 它可能不得不与像日本的语言做了,虽然 对于控件,如需要他们的文本动态设置标签,设置窗体上的文本,让你知道这只是一个标记。我用##对于这一点,它真正脱颖而出。避免文本设置为动态文本样本,因为你永远记住,控制得到通过看形式动态地设置。