The prefix can
be either of the following, in upper- or lowercase:
??? i- for culture names registered with the Internet Assigned Numbers Authority (IANA)
??? x- for all others
The language part is the lowercase two-letter code from the ISO 639-1 standard, while the
region is a two-letter uppercase code from the ISO 3166 standard. For example, Russian spoken
in Russia is ru-RU. The suffix component is used to further sub-identify the culture based
on some other data. For example, Serbian spoken in Serbia could be either sr-SP-Cyrl or
sr-SP-Latn??”one for the Cyrillic alphabet and the other for the Latin alphabet. If you define a
culture specific to your division within your company, you could create a culture using the
name x-en-US-MyCompany-WidgetDivision.
Let??™s use CultureAndRegionInfoBuilder to create a fictitious culture based upon a preexisting
culture. In the United States, the dominant measurement system is English units. Let??™s
suppose that the United States decided to switch to the metric system at some point, and you
now need to modify the culture information on some machines to match. Let??™s see what that
code would look like:
Imports System
Imports System.Globalization
CHAPTER 9 n WORKING WITH STRINGS 171
Public Class EntryPoint
Shared Sub Main()
Dim cib As CultureAndRegionInfoBuilder = Nothing
cib = New CultureAndRegionInfoBuilder("x-en-US-metric", _
CultureAndRegionModifiers.
Pages:
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291