Beispiel #1
0
        // Get the culture handler for the current culture.
        public static RootCulture GetCurrentCulture()
        {
            // Get the culture handler for the current culture.
            int           cultureID = CultureInfo.CurrentCulture.LCID;
            StringBuilder builder   = new StringBuilder();

            builder.Append(hex[(cultureID >> 12) & 0x0F]);
            builder.Append(hex[(cultureID >> 8) & 0x0F]);
            builder.Append(hex[(cultureID >> 4) & 0x0F]);
            builder.Append(hex[cultureID & 0x0F]);
            String      name    = builder.ToString();
            RootCulture culture =
                (PrimaryManager.Instantiate("CID" + name) as RootCulture);

            // Use invariant English if we couldn't find the culture.
            if (culture == null)
            {
                culture = new CNen();
            }
            return(culture);
        }
	// Get the culture handler for the current culture.
	public static RootCulture GetCurrentCulture()
			{
				// Get the culture handler for the current culture.
				int cultureID = CultureInfo.CurrentCulture.LCID;
				StringBuilder builder = new StringBuilder();
				builder.Append(hex[(cultureID >> 12) & 0x0F]);
				builder.Append(hex[(cultureID >> 8) & 0x0F]);
				builder.Append(hex[(cultureID >> 4) & 0x0F]);
				builder.Append(hex[cultureID & 0x0F]);
				String name = builder.ToString();
				RootCulture culture =
					(PrimaryManager.Instantiate("CID" + name) as RootCulture);

				// Use invariant English if we couldn't find the culture.
				if(culture == null)
				{
					culture = new CNen();
				}
				return culture;
			}