public AppLanguageChangedMessage( object sender, AppLanguageType appLanguage, bool restartActivity) : base(sender) { NewLanguage = appLanguage; RestartActivity = restartActivity; }
public void SetLanguage(AppLanguageType appLanguage, bool restartActivity = true) { string lang = appLanguage == AppLanguageType.English ? "en" : "es"; CurrentLanguage = new CultureInfo(lang); //let all ViewModels that are active know that the culture has changed _messenger.Publish(new AppLanguageChangedMessage(this, appLanguage, restartActivity)); }
public void SetLanguage(AppLanguageType appLanguage, bool notifyAllVms = false) { string lang = appLanguage == AppLanguageType.English ? "en" : "es"; CurrentLanguage = new CultureInfo(lang); //let all ViewModels that are active know, that the culture has changed if (notifyAllVms) { _messenger.Publish(new AppLanguageChangedMessage(this, appLanguage)); } }
public AppLanguageChangedMessage(object sender, AppLanguageType appLanguage) : base(sender) { NewLanguage = appLanguage; }