CultureInfo.Parent Property
Silverlight
Gets the CultureInfo that represents the parent culture of the current CultureInfo.
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Globalization.CultureInfoThe CultureInfo that represents the parent culture of the current CultureInfo.
The cultures have a hierarchy in which the parent of a specific culture is a neutral culture, the parent of a neutral culture is the InvariantCulture, and the parent of the InvariantCulture is the invariant culture itself. The parent culture encompasses only the set of information that is common among its children.
The following example determines the parent culture of each specific culture that uses the Chinese language.
using System; using System.Globalization; public class Example { public static void Demo(System.Windows.Controls.TextBlock outputBlock) { // Displays the header. outputBlock.FontFamily = new System.Windows.Media.FontFamily("Courier New"); outputBlock.Text += "SPECIFIC CULTURE PARENT CULTURE" + "\n"; // Create an array of Chinese culture names. string[] cultureNames = { "zh-CN", "zh-Hans", "zh-Hant", "zh-HK", "zh-MO", "zh-SG", "zh-TW", }; // Determines the specific cultures that use the Chinese language, and displays the parent culture. foreach (string cultureName in cultureNames) { CultureInfo ci = new CultureInfo(cultureName); outputBlock.Text += String.Format("{0,-7} {1,-37}", ci.Name, ci.EnglishName); outputBlock.Text += String.Format("{0,-7} {1}\n", ci.Parent.Name, ci.Parent.EnglishName); } } } /* This example produces the following output. SPECIFIC CULTURE PARENT CULTURE zh-CN Chinese (People's Republic of China) zh-Hans Chinese zh-Hans Chinese Invariant Language (Invariant Country) zh-Hant Chinese Invariant Language (Invariant Country) zh-HK Chinese (Hong Kong S.A.R.) zh-Hant Chinese zh-MO Chinese (Macao S.A.R.) zh-Hant Chinese zh-SG Chinese (Singapore) zh-Hans Chinese zh-TW Chinese (Taiwan) zh-Hant Chinese */
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.