开发者

Localizing a (vb).NET enterprise app into a different language (with a twist)

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 pe开发者_运维百科r 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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜