views:

61

answers:

2

We're going global. I've been tasked with refactoring our existing products to support localization. Last week I shunned using resource files (.resx) in favor of a home-baked database look-up method. After hitting a serious snag with that, I'm back to the microsoft way of using resx.

All the documentation I've seen so far details how to create new "World-Ready" applications, but I don't see anything on changing existing applications. Is my only recourse to touch the application form by form and control by control to have it point to newly created resource files?

Any good sources/links for internationalizing your apps?

Edit: These are C# winform apps using mostly 2.0 framework I believe. I'm new with the company.

+1  A: 

Sorry, no good sources or links for internationalizing your appolication,but maybe using this resource refactoring tool together with the localization FxCop rule might help to find all strings to localize. Imo, this rule is too strict (exception texts or logging output for example are not meant to be read by the enduser) but your mileage may vary.

tobsen
+1 for the refactoring tool. I wish I had that 2 weeks ago when I did an entire website manually.
Brandon
A: 

It's going to be a lot of work, probably more than if the application was localized to begin with, because now you have to remove/edit things instead of just creating them.

Even if there is an automated tool to help out, you'll want to go through each form one by one to make sure the formatting won't break for localized strings (some languages are generally longer than others; i.e., German vs. English). This should be easier for a web forms application, but you didn't specify the application type, so I'll try to give a medium-neutral answer here.

Have a look at my answer to this question for my strategy on distributing the localized strings through your application.

The biggest issue I've seen are localized strings where the language syntax is important and code is injecting values into the strings programmatically. Try to avoid these as they will cause you nothing but pain. I remember a question on here about localizing a string such as "x days, y hours, z minutes" -- or something to that effect.

The strategy I use in most of these situations is to find a way to display the same data in a locale-neutral way, if at all possible. For example, instead of having a single label with the text "45 minutes" refactor it to separate the label from the value as "Minutes:" and "45". Things like that. Refactoring a UI is as much an art as a science, so it's difficult to give a specific answer without knowing what you're dealing with, or the business domain, or use cases, etc.

Jon Seigel