Skip to content

Commit

Permalink
fix: 调整多语言provider
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Nov 15, 2024
1 parent c486950 commit aa970b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public override async Task<ProviderCultureResult> DetermineProviderCultureResult
var culture = result.Cultures.First();

// 判断是否以 zh-CN(浏览器默认),zh-HK(中国香港),zh-MO(中国澳门),zh-TW(中国台湾)区域开头,如果是一律采用简体中文
if (culture.Buffer != null && (culture.Buffer.StartsWith("zh-CN") || culture.Buffer.StartsWith("zh-HK") || culture.Buffer.StartsWith("zh-TW") || culture.Buffer.StartsWith("zh-MO")))
if (culture.Buffer != null && (culture.Buffer.StartsWith("zh-CN") || culture.Buffer.StartsWith("zh-cn") || culture.Buffer.StartsWith("zh-HK") || culture.Buffer.StartsWith("zh-TW") || culture.Buffer.StartsWith("zh-MO")))
{
culture = new StringSegment("zh-Hans");
return new ProviderCultureResult(culture.Buffer, culture.Buffer);
Expand Down

0 comments on commit aa970b8

Please sign in to comment.