void SetCulture(CultureInfo culture) { IGlobalizationService service = GlobalServices.Instance.GetService <IGlobalizationService>(); if (service == null) { return; } if (culture == null) { culture = service.CurrentOSCulture; } service.CurrentCulture = culture; service.CurrentUICulture = culture; GridLocalizer.ResetCache(); DemoLocalizer.ResetCache(); DemoStringIdLocalizer localizer = this.Resources["localizer"] as DemoStringIdLocalizer; if (localizer != null) { localizer.CultureName = culture.Name; } UpdateCurrentCultureName(); grid.Redraw(true); }
void SwitchToSystemCulture() { IGlobalizationService service = GlobalServices.Instance.GetService <IGlobalizationService>(); if (service == null) { return; } CultureInfo culture = service.CurrentOSCulture; service.CurrentCulture = culture; service.CurrentUICulture = culture; GridLocalizer.ResetCache(); DemoLocalizer.ResetCache(); }