public void SayHello(ELanguages eLanguages) { Factory factory = new Factory(); this.hello = factory.GetHello(eLanguages); this.hello.SayHello(); }
public void SetLanguage(ELanguages lang) { string uri = ""; switch (lang) { case ELanguages.Korean: uri = "ko-KR"; break; case ELanguages.English: uri = "en-US"; break; } foreach (var resource in App.Current.Resources.MergedDictionaries) { if (resource.Source.OriginalString.Contains("Languages")) { App.Current.Resources.Remove(resource); break; } } uri = "Languages/" + uri + ".xaml"; App.Current.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri(uri, UriKind.Relative) }); }
public static LanguagePack FromLanguage(ELanguages language) { if (presets.ContainsKey(language)) { return(presets[language]); } return(null); }
protected LanguageManager() { _languages = new Dictionary <ELanguages, Language> { { ELanguages.English, new English() }, { ELanguages.Chinese, new Chinese() }, { ELanguages.German, new German() }, { ELanguages.French, new French() }, { ELanguages.Turkish, new Turkish() }, }; _currentLanguage = ELanguages.Default; }
protected LanguageManager() { _languages = new Dictionary<ELanguages, Language> { {ELanguages.English, new English()}, {ELanguages.Chinese, new Chinese()}, {ELanguages.German, new German()}, {ELanguages.French, new French()}, {ELanguages.Turkish, new Turkish()}, }; _currentLanguage = ELanguages.Default; }
public static ILanguage GetLanguage(ELanguages eLanguages) { ILanguage _iLanguage; switch (eLanguages) { case ELanguages.English: _iLanguage = new English(); break; case ELanguages.Spanish: _iLanguage = new Spanish(); break; default: throw new Exception("Unsupported Language."); } return(_iLanguage); }
public virtual IHello GetHello(ELanguages eLanguages) { IHello hello = null; switch (eLanguages) { case ELanguages.pl: hello = new PolishHello(); break; case ELanguages.eng: hello = new EnglishHello(); break; case ELanguages.esp: hello = new SpanishHello(); break; case ELanguages.ger: hello = new GermanHello(); break; case ELanguages.fr: hello = new FrenchHello(); break; case ELanguages.it: hello = new ItalianHello(); break; default: break; } return(hello); }
public void SetLanguage(ELanguages newLanguage) { CurrentLanguage = (int) newLanguage; }
public void SetLanguage(ELanguages newLanguage) { CurrentLanguage = (int)newLanguage; }
public void SetNewLanguage(ELanguages newLanguage) { _currentLanguage = newLanguage; Config.Singleton.GeneralSettings.SetLanguage(_currentLanguage); }