CultureSupported.cs 574 B

123456789101112131415161718192021
  1. using System.Globalization;
  2. using System.Threading;
  3. using MECF.Framework.Common.Properties;
  4. namespace Aitex.Core.Utilities
  5. {
  6. public class CultureSupported
  7. {
  8. public const string Chinese = "zh-CN";
  9. public const string English = "en-US";
  10. public static void UpdateCoreCultureResource(string culture)
  11. {
  12. Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
  13. Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
  14. Resources.Culture = new CultureInfo(culture);
  15. }
  16. }
  17. }