X hits on this document

135 views

0 shares

0 downloads

0 comments

26 / 67

2

.NET INTERNATIONALIZATION

The first and simplest reason is to update an existing culture that has obsolete or undesirable information. In the section “The CultureInfo Class,” in Chapter 6, I noted that some information, such as currency information, in existing cultures becomes incorrect over a period of time. The .NET Framework 2.0 has a new baseline of culture data to update many past inaccuracies to reflect the world at the time of its launch; (e.g., the Turkish (Turkey) currency has been updated from TL (Türk Lirasi) to YTL (Yeni Türk Lirasi). In addition, culture information can be kept up-to-date by using Windows Update. In nearly all cases, the need to update cul- ture information because of obsolete information is low. However, there will always be exceptions, and there will come a time when the existing information is undesir- able (as opposed to incorrect). Custom cultures allow you to create a “replacement” culture with the same name and LCID as an existing culture, but with different prop- erty values. The first custom culture that we create here is just such a culture.

Another common reason to use a custom culture is to support a known language outside its known country of use. For example, Spanish is widely used in the United States, but the .NET Framework does not have an es-US (Spanish (United States)) culture. Table 11.1 shows a number of examples of these cultures.

Culture Name

Culture EnglishName

Approx. Number of Users of This Language in This Region

es-US

Spanish (USA)

22,400,000

hi-GB

Hindi (United Kingdom)

1,300,000

pa-CA

Punjabi (Canada)

300,000

zh-CA

Chinese (Canada)

870,000

zh-US

Chinese (USA)

2,000,000

It would be unfeasible for Microsoft to support the complete list of possible com- binations of countries and languages, considering that there are nearly 200 countries in the world and nearly 7,000 languages. We can create “supplemental” custom cul- tures for these “missing” country/language combinations. The Spanish (United

Table 11.1

Examples of Custom Cultures for Languages Outside Their Known Countries

Document info
Document views135
Page views135
Page last viewedFri Dec 02 18:24:42 UTC 2016
Pages67
Paragraphs859
Words13458

Comments