public LocalizationService(ILocalizationDataProvider dataProvider) { AvailableCultures = dataProvider.AvailableCultures; DefaultCulture = dataProvider.DefaultCulture; CurrentCulture = DefaultCulture; texts = dataProvider.Data; OnCultureChanged?.Invoke(null, CurrentCulture); }
public void ChangeCulture(CultureInfo cultureInfo) { currentCulture = cultureInfo; OnCultureChanged?.Invoke(this, new CultureChangeEventArgs { Culture = cultureInfo }); }
public static void SetCurrentCulture(CultureInfo culture) { currentCulture_ = culture; OnCultureChanged.Invoke(); }