将 (vb).NET 企业应用程序本地化为不同的语言(有一些变化)

发布于 2024-12-06 18:48:33 字数 1160 浏览 0 评论 0原文

我已经构建了一个应用程序,它很大。 VB.NET、.NET 3.5。花了两年时间制作了 12 个项目(1 个 .exe,11 个 .dll),每个项目都包含数十个 WinForm。数千个业务对象类。你明白了。

这是对现有遗留业务线企业应用程序套件的 .NET 迁移。它的开发已接近尾声,尚未投入生产,但代码看起来很干净,并且该项目很可能会成功。

然而它是用英语设计的(所有表单及其控件都是英语)并且具有从左到右的阅读顺序。

不同的是,我有一个新的要求,需要将申请翻译成沙特阿拉伯语,我想要一些关于我应该如何解决这个问题的建议,以及对我当前想法的批评,看看你是否可以找出我对 Microsoft .NET 本地化理解中的任何缺陷。

我正在寻找对我的方法的技术批评,而不是商业批评。

我的计划:

  1. 手动(可以通过宏或自动化来完成吗?)解析每个项目中的每个类,并将代码中对字符串的引用替换为资源文件中的字符串。

  2. 重新对齐和重新定位控件,使其适合从左到右和从右到左的阅读顺序。

  3. 更改所有控件以引用新项目(或表单)语言资源文件。

    (现阶段对于英语最终用户来说没有明显差异)

  4. 让翻译人员翻译新语言资源文件中的所有字符串。

  5. 根据系统区域设置动态确定要加载的资源文件。

具体问题:

  1. 是否有工具可以帮助将字符串从代码迁移到资源文件中?

  2. 我应该如何锚定控件以支持从右到左的阅读顺序,而不影响表单设计的从左到右的阅读顺序?

  3. .NET Framework 区域设置支持什么操作系统版本?我认为 XP SP1 是基准?

  4. 我应该为每个项目或每个表单使用一个资源文件吗?

  5. 是否应该将任何硬编码字符串(用于消息框)的翻译写入代码中(在 if, else 块中)或将其集成到新语言资源文件之一中?

——

如果您能提供任何建议,我们将不胜感激。这是我第一次考虑翻译,因此欢迎提供有关最快、最可持续的成功之路的任何提示或想法:-)

预先感谢您的宝贵时间,

迈克

I've built an application and it's big. VB.NET, .NET 3.5. Two years in the making, 12-projects (1 .exe, 11 .dll's), each containing dozens of WinForms. Thousands of business object classes. You get the picture.

It's a .NET migration for an existing legacy line of business enterprise application suite. It's nearing the end of development and isn't in production yet but the code looks clean(ish) and the project is likely to be successful.

However it was designed in English (all forms and their controls are in English) and with a left-to-right read order.

The twist is that I have a new requirement to translate the application in Saudi Arabian and I'd like some suggestions on how I should be tackling this and also a critique of my current thinking to see if you can spot any flaws in my understanding of localization with Microsoft .NET.

I'm looking for a technical rather than a business critique of my approach.

My Plan:

  1. Manually (can this be done with a Macro or automation?) parse through each class in each project and replace references to strings in code to strings in a resource file.

  2. Re-align and re-anchor controls to make them suitable for both left-to-right and right-to-left reading order.

  3. Change all of the controls to reference the new project (or form) language resource file.

    (at this stage there are no noticeable differences to an English-speaking end user)

  4. Have a translator translate all the strings in the new language resource file.

  5. Dynamically determine which resource file to load depending on the system locale.

Specific questions:

  1. Is there a tool available to assist with the migration of strings out of the code and into resource files?

  2. How should I anchor controls to support right-to-left reading order without compromising on the left-to-right reading order that the forms were designed for?

  3. What operating system version does the .NET framework locale support? I presume XP SP1 as a baseline?

  4. Should I use a single resource file per project or per form?

  5. Should translations for any hard coded strings (for message boxes) be written into the code (in an if, else block) or also integrated into one of the new language resource files?

--

Any advice that you can offer will be warmly appreciated. This is the first time that I've had to give thought to translation so any tips or thoughts as to the quickest and most sustainable route to success are welcome :-)

Thanks in advance for your time,

Mike

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回忆凄美了谁 2024-12-13 18:48:34

关于代码内字符串:Resharper 是将字符串提取到可本地化资源文件的出色工具。

看看这些功能:http://www.jetbrains.com/resharper/features/国际化.html

Regarding your in-code strings: Resharper is an excellent tool for extracting strings to a localizable resource file.

Take a look at the features: http://www.jetbrains.com/resharper/features/internationalization.html

在梵高的星空下 2024-12-13 18:48:33

这比您想象的要简单得多,只要您使用 Winforms 中内置的本地化支持并避免尝试提出自定义方案即可。选择一个表单,将其 Localized 属性设置为 True。将语言属性更改为阿拉伯语(沙特阿拉伯)。更改 RightToLeft 和 RightToLeftLayout 属性。这就是你完成的地方。将 .resx 文件发送到本地化服务进行翻译。

This is far simpler than you're guessing, as long as you use the built-in support for localization in Winforms and avoid trying to come up with a custom scheme. Pick a form, set its Localizable property to True. Change the Language property to Arabic (Saudi Arabia). Change the RightToLeft and RightToLeftLayout properties. That's where you're done. Ship the .resx files to a localization service for translation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文