public LocalizationService(ILocalizationDataProvider dataProvider)
        {
            AvailableCultures = dataProvider.AvailableCultures;
            DefaultCulture    = dataProvider.DefaultCulture;
            CurrentCulture    = DefaultCulture;
            texts             = dataProvider.Data;

            OnCultureChanged?.Invoke(null, CurrentCulture);
        }
Exemplo n.º 2
0
        public void ChangeCulture(CultureInfo cultureInfo)
        {
            currentCulture = cultureInfo;

            OnCultureChanged?.Invoke(this, new CultureChangeEventArgs
            {
                Culture = cultureInfo
            });
        }
Exemplo n.º 3
0
 public static void SetCurrentCulture(CultureInfo culture)
 {
     currentCulture_ = culture;
     OnCultureChanged.Invoke();
 }