How to test localized application?

26 באוגוסט 2007

תגיות: , , , , , ,
3 תגובות

[This blog was migrated. You will not be able to comment here.
The new URL of this post is http://khason.net/blog/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 >>


Download LocTester Source >>

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

3 תגובות

  1. ekampf26 באוגוסט 2007 ב 22:52

    Kudos!!
    This is just what I needed…

    הגב
  2. tamir27 באוגוסט 2007 ב 10:10

    hi, Eran
    I'm happy, that it's useful for you

    הגב
  3. Peter Gfader21 באוגוסט 2008 ב 3:06

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

    THANKS Tamir

    הגב