private static void UpdateCurrentThreadCulture(int value) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(LocalizationConverter.Convert(value)); Thread.CurrentThread.CurrentCulture = new CultureInfo(LocalizationConverter.Convert(value)); }
public void Data_with_prefix_should_be_empty() { DISetup.SetupContainer(); var locManager = new Mock <ILocalizationManager>(); locManager.Setup(s => s.GetResource(It.Is <string>(s => s == "prefix.test"))).Returns("test localization"); DISetup.Container.RegisterInstance(locManager.Object); var converter = new LocalizationConverter(); var result = converter.Convert("test 2", null, "prefix", null); result.Should().BeNull(); }
public static CultureInfo GetCurrentCulture() { return(new CultureInfo(LocalizationConverter.Convert(culture))); }
public string GetText(int lang) { return(SystemNewsLocalized.First(l => l.Language == LocalizationConverter.Convert(lang)).NewsContentText); }
public string GetTopic(int lang) { return(SystemNewsLocalized.First(l => l.Language == LocalizationConverter.Convert(lang)).Header); }