public static Lang Activate(Lang defaultInstance) { try { _languageInstance = defaultInstance; string languageName = PreferencesBase.Res.LastLanguageName; if (languageName.Length > 0) return LoadLanguage(languageName); return Activate(); } catch (StoredObjectException ex) { Messenger.ShowError(ex); } catch (Exception ex) { Messenger.ShowError(ex); } return null; }
public static Lang Activate(string languageName) { if (_languageInstance != null && string.Compare(CurrentLanguageName, languageName, true) == 0) return _languageInstance; _languageInstance = new Msgs(); return LoadLanguage(languageName); }