X hits on this document

182 views

0 shares

0 downloads

0 comments

54 / 67

30

.NET INTERNATIONALIZATION

been localized. The text could have come just as easily from a call to ResourceMan- ager.GetString(“Sunday”), and there is no way to make this distinction visually if the text in the DateTimeFormatInfo is the same as a pseudo-ized resource.

With the pseudo translation culture in place, you might want to update the PseudoTranslation class introduced in Chapter 9 to use the new culture instead of the previously hijacked culture:

public class PseudoTranslation {

private static CultureInfo cultureInfo =

new CultureInfo(“pd-PD”); public static CultureInfo CultureInfo {

get {return cultureInfo;} set {cultureInfo = value;}

}

}

Culture Builder Application Sample (CultureSample)

One of the sample applications in the Visual Studio 2005 documentation is called the Culture Builder Application Sample (aka CultureSample) and is aimed squarely at creating custom cultures. Start the documentation and search for “Culture Builder Sample.” Open either the CultureSampleCS.sln or CultureSampleVB.sln Win- dows Forms applications and build it; you will get CultureBuilderSample.exe, a UI for building new custom cultures (see Figure 11.4).

Click “New Culture.” After you enter the culture’s name, you can specify the cul- ture’s formatting options using a dialog (see Figure 11.5), modeled on the Regional and Language Options’ Customize dialog.

Document info
Document views182
Page views182
Page last viewedFri Dec 09 06:17:10 UTC 2016
Pages67
Paragraphs859
Words13458

Comments