public void Configure() { mediatorMap.Map <ILanguageView>().ToMediator <LanguageMediator>(); mediatorMap.Map <ICurrentLanguageView>().ToMediator <CurrentLanguageMediator>(); mediatorMap.Map <IChangeLanguageView>().ToMediator <ChangeLanguageMediator>(); commandMap.Map(LanguageRequestEvent.Type.REQUEST_CONTENT).ToCommand <RequestTextCommand>(); commandMap.Map(LanguageRequestEvent.Type.REQUEST_CURRENT_LANGUAGE).ToCommand <RequestTextCommand>(); commandMap.Map(LanguageEvent.Type.CHANGE_LANGUAGE).ToCommand <ChangeLanguageCommand>(); commandMap.Map(LanguageEvent.Type.CHANGE_LANGUAGE).ToCommand <SaveLanguageCommand>(); string language; if (saveService.LanguageName == null) { language = Enum.GetName(typeof(SystemLanguage), Application.systemLanguage); logger.Info("Setting System Language: {0}", language); } else { language = saveService.LanguageName; logger.Info("Loading Saved Language: {0}", language); } model.SetCurrentLanguage(language); }
public void Execute() { model.SetCurrentLanguage(evt.LanguageKey); }