Skip to content

Commit

Permalink
fix: Localization of date and number formats (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed May 21, 2024
1 parent 6a6b39f commit 0200d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Masa.Stack.Components/Configs/GlobalConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public CultureInfo Culture
get => _i18N.Culture;
set
{
_i18N.SetCulture(value);
_i18N.SetCulture(new CultureInfo("en-US"), value);
_cookieStorage.SetAsync(LangCookieKey, value.Name);
OnLanguageChanged?.Invoke();
}
Expand Down Expand Up @@ -96,7 +96,7 @@ public async void Initialization()
var lang = await _cookieStorage.GetAsync(LangCookieKey);
if (!string.IsNullOrWhiteSpace(lang))
{
_i18N.SetCulture(new CultureInfo(lang));
_i18N.SetCulture(new CultureInfo("en-US"), new CultureInfo(lang));
}
}
}

0 comments on commit 0200d06

Please sign in to comment.