How to test localized application?

You finished writing World-Ready application. It detects current system culture, or possibly, UI culture, or, even Region and change it’s layout language to language, detected with those methods. Now, you want to test it on different locales. What to do? You can go to test PC or, if you’re advanced user, install virtual PC images and test the application, while changing Regional and Language Options for each of locale, you want to test. Pretty complicated, especially,  when you want to change UI culture – MUI application requires restart. How to make it easier?

image

You can try tinny test application, I wrote to perform such task. All you have to do is open your target application via LocTester (or just drop the executable into it and play with cultures to test localization support. Here the screenshot of LocTester

image

And small video, that demonstrates the way you’ll use it.

Now a little bit about localization in general. First  of all, we have to decide what we want from localization. If all you want is locale-specific dates, currencies or formats, you, probably have to use CultureInfo.CurrentCulture class, if all you want is detect the geographical location of end users, use RegionInfo.CurrentRegion (it’s derived from CurrentCulture). In case, you do not need to change formats, but you want to localize user interface for those users, who has Start button on other language, use CurrentCulture.CurrentUICulture class. How to use it? Simple

    if (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("fr"))
       { 

 this.ChangeUICulture("fr");
       } 

 else if (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("de"))
       { 

 this.ChangeUICulture("de");
       } 

 else if (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.Equals("it"))
       { 

 this.ChangeUICulture("it");
       } 

Now test it with LocTester to see results. You can compare them later, by changing system locale :)

Download LocTester binaries or sources.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • Live
  • Reddit
  • TwitThis
  • email
  • Slashdot
  • StumbleUpon

5 Responses to “How to test localized application?”

  1. Peter Gfader Says:

    Just now i thought of programming something like this!!!

    THANKS Tamir

  2. Just code - Tamir Khason Says:

    There are a lot of cases, you have to validate, that user inputs numbers only into TextBox. Someone things

  3. Tamir Khason Says:

    hi, Eran

    I’m happy, that it’s useful for you

  4. ekampf Says:

    Kudos!!

    This is just what I needed…

  5. Fawn Danesh Says:

    Hello, I found this blog post while searching for help with Microsoft Silverlight. I’ve recently switched internet browser from Chrome to Microsoft IE 6. Now I seem to have a issue with loading sites that have Microsoft Silverlight. Everytime I go on a site that requires Microsoft Silverlight, my computer does not load and I get a “npctrl.dll” error. I cannot seem to find out how to fix the problem. Any aid getting Microsoft Silverlight to function is very appreciated! Thanks

Leave a Reply

Recommended

 


Sponsor


Partners

WPF Disciples
Dreamhost
Code Project
Switched to Better Place

Together