X hits on this document

185 views

0 shares

0 downloads

0 comments

63 / 67

CUSTOM CULTURES

exported LDML file, you will find two lines that prevent the custom culture from being created on the target machine:

<msLocale:textInfoName type=”cy-GB” /> <msLocale:sortName type=”cy-GB” />

These lines define the text info and sort orders, respectively. The problem with these lines is that they refer to text info and sort definitions that the target machine does not have. These lines must be changed to a text info and sort order that the tar- get machine does have. The remainder of the Export method does just this. The result is that these lines are changed:

<msLocale:textInfoName type=”en-GB” /> <msLocale:sortName type=”en-GB” />

Of course, this means that the text info and sort orders of these exported custom cultures will not be entirely correct, but because it is not possible to define new text infos and sort orders for custom cultures, this is a limitation that we have to live with.

Company-Specific Dialects

As mentioned in “Uses for Custom Cultures,” at the beginning of this chapter, it can be useful to create a set of resources that use a vocabulary that is specific to a single company or group of companies. The CreateChildCultureAndRegionInfo- Builder method does just this and can be used like this:

CultureAndRegionInfoBuilder builder = CultureAndRegionInfoBuilderHelper. CreateChildCultureAndRegionInfoBuilder( new CultureInfo(“en-US”),

“en-US-Sirius”, “English (United States) “English (United States)

(Sirius Minor Publications)” (Sirius Minor Publications)”

, ,

“United States (Sirius Minor Publications)”, “United States (Sirius Minor Publications)”);

builder.Register();

The method accepts a culture (e.g., “en-US”) to inherit from, and accepts the new culture name and various strings to set various name properties to. It returns a

39

Document info
Document views185
Page views185
Page last viewedSat Dec 10 06:39:58 UTC 2016
Pages67
Paragraphs859
Words13458

Comments