Exemplo n.º 1
0
        public LanguageHelper()
        {
            var container = (Application.Current.Resources["bootstrapper"] as AppBootstrapper).Container;
            this.eventAggregator = container.GetInstance(typeof(IEventAggregator), null) as IEventAggregator;
            this.storageService = container.GetInstance(typeof(IStorageService), null) as IStorageService;

            CultureInfo cultureInfo = null;
            var setting = storageService.GetCurrentLanguage();
            if (setting != null)
            {
                cultureInfo = new CultureInfo(setting);
            }
            else
            {
                cultureInfo = CultureInfo.CurrentCulture;
            }
            SetLanguage(cultureInfo);
        }