Introduction to Globalization

A globalized application is one that works in any locale it's installed in. That means if you develop an application on a computer with English - United States as the regional settings in the Control Panel, your application also functions correctly on a computer where the regional settings are Spanish - Mexico. This isn't a trivial issue, but understanding how to localize your applications using .NET will make your life easier.

When you write code, you're concentrating on the user interface and the application logic. Most of the time, you don't expect that anyone outside of your company or your country will use your application. However, if the possibility exists, you must take specific steps to make sure that when the application runs in another locale, it makes sense to the end user.

When writing applications for different locales, you must make sure that you're writing in a culture- and language-neutral manner. That means you aren't hard-coding number and string formatting for dates, times, and currencies. It also means that user interface elements, such as the Text properties on labels, make sense. In other words, saying “Hello” in English takes less space on a label than saying “Bonjour” in French. Making your code and interface culture- and language-neutral is the first step in ensuring that your application works in other locales.

The next things you need to worry about are the resources that the application needs when it runs in another locale. A resource is anything that might display on a form, be it a text string or a bitmap. When you write culture-neutral code, you're setting user interface text through resources, not through hard-coded properties.

After you build the application, the final step is to test the various locales that you've prepared for and make sure that they work correctly.

Using .NET, there are several different ways to create global applications with relative ease. The first thing you need to understand is the CultureInfo class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.36