Language, Locales, and Cultures in the .NET Compact Framework for Xbox 360

Language and locale support on the Xbox 360 video game and entertainment system differs from that provided by managed culture objects in .NET. The Xbox 360 console language and locale are set by the user, and are independent of each other. For example, the console may be using the German language, but be located in Greece.

Managed culture objects (such as CultureInfo), however, are based on both language and region, where the region is dependent on the language. For example, the German language has only five valid culture regions: Austria, Germany, Liechtenstein, Luxembourg, and Switzerland.

In the .NET Compact Framework for Xbox 360, the CultureInfo returned for CurrentCulture and CurrentUICulture is based primarily on the console's current language, not its locale. Only if the locale matches one of a subset of regions for the current language will the locale secondarily affect the returned culture.

For example, if the console's language is German, the culture returned by CurrentCulture will be:

  • 'de-AT' (German - Austria) if the console's locale is Austria,
  • 'de-CH' (German - Switzerland) if the console's locale is Switzerland, and
  • 'de-DE' (German - Germany) for all other locales, including locales that are valid for German (Germany, Liechtenstein, and Luxembourg) and those that are not (Greece, Korea, and India, for example).

Due to these differences, it is important to use static CultureInfo objects (rather than those returned by CurrentCulture) when displaying data from RegionInfo objects or non-Gregorian calendars. If you do not use static CultureInfo objects, note that locale mapping differences may produce unexpected or undesirable results. For example:

  • If the console language is set to Traditional Chinese, and the locale is set to China, CurrentCulture and CurrentUICulture return the culture 'zh-TW' (Chinese - Taiwan).

  • If the console language is set to Simplified Chinese, and the locale is set to Taiwan, CurrentCulture and CurrentUICulture return the culture 'zh-CN' (Chinese - China).

    Important

    Whether it is Traditional Chinese or Simplified Chinese, the console language, not the locale, determines the returned culture.

XNA developers must also be aware of locale mapping differences that can affect application development when they develop for Xbox 360 instead of Windows-based game machines. For example, the behavior of many managed functions, such as ToUpper, can vary based on the value of CurrentCulture and CurrentUICulture.

The following table shows the culture returned by CurrentCulture and CurrentUICulture based on the console's language and locale setting. A default culture is returned when the console's locale doesn't match a region supported for the console's language.

Console Language Console Locale Culture
Chinese (Simplified) China zh-CN (Chinese - China)
Singapore zh-SG (Chinese - Singapore)
(all others) zh-CN (Chinese - China)
Chinese (Traditional) Hong Kong SAR zh-HK (Chinese - Hong Kong SAR)
Taiwan zh-TW (Chinese - Taiwan)
(all others) zh-TW (Chinese - Taiwan)
English Australia en-AU (English - Australia)
Canada en-CA (English - Canada)
Great Britain en-GB (English - Great Britain)
Ireland en-IE (English - Ireland)
New Zealand en-NZ (English - New Zealand)
South Africa en-ZA (English - South Africa)
United States en-US (English - United States)
(all others) en-US (English - United States)
French Belgium fr-BE (French - Belgium)
Canada fr-CA (French - Canada)
France fr-FR (French - France)
Switzerland fr-CH (French - Switzerland)
(all others) fr-FR (French - France)
German Austria de-AT (German - Austria)
Germany de-DE (German - Germany)
Switzerland de-CH (German - Switzerland)
(all others) de-DE (German - Germany)
Italian Italy it-IT (Italian - Italy)
Switzerland it-CH (Italian - Switzerland)
(all others) it-IT (Italian - Italy)
Japanese Japan ja-JP (Japanese - Japan)
(all others) ja-JP (Japanese - Japan)
Korean Korea ko-KR (Korean - Korea)
(all others) ko-KR (Korean - Korea)
Polish Poland pl-PL (Polish - Poland)
(all others) pl-PL (Polish - Poland)
Portuguese Brazil pt-BR (Portuguese - Brazil)
Portugal pt-PT (Portuguese - Portugal)
(all others) pt-BR (Portuguese - Brazil)
Russian Russia ru-RU (Russian - Russia)
(all others) ru-RU (Russian - Russia)
Spanish Chile es-CL (Spanish - Chile)
Colombia es-CO (Spanish - Colombia)
Mexico es-MX (Spanish - Mexico)
Spain es-ES (Spanish - Spain)
(all others) es-ES (Spanish - Spain)

See Also

Concepts

Performing Culture-Insensitive Case Changes
Performing Culture-Insensitive String Operations

Reference

CultureInfo
CurrentCulture
CurrentUICulture