From 99ddfcc9520e23b6c206618f968146bd53d3ea98 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Mon, 1 Jul 2024 20:41:14 +0800 Subject: [PATCH] misc: use lowercase culture name. --- src/Semi.Avalonia/Themes/SemiTheme.axaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs index a2646cf..bb68581 100644 --- a/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs +++ b/src/Semi.Avalonia/Themes/SemiTheme.axaml.cs @@ -11,8 +11,8 @@ public class SemiTheme: Styles { private static readonly Dictionary _localeToResource = new() { - { new CultureInfo("zh-CN"), "avares://Semi.Avalonia/Locale/zh-CN.axaml" }, - { new CultureInfo("en-US"), "avares://Semi.Avalonia/Locale/en-US.axaml" }, + { new CultureInfo("zh-cn"), "avares://Semi.Avalonia/Locale/zh-cn.axaml" }, + { new CultureInfo("en-us"), "avares://Semi.Avalonia/Locale/en-us.axaml" }, }; private readonly IServiceProvider? sp; @@ -43,13 +43,13 @@ public class SemiTheme: Styles { if (locale is null) { - return _localeToResource[new CultureInfo("zh-CN")]; + return _localeToResource[new CultureInfo("zh-cn")]; } if (_localeToResource.TryGetValue(locale, out var resource)) { return resource; } - return _localeToResource[new CultureInfo("zh-CN")]; + return _localeToResource[new CultureInfo("zh-cn")]; } } \ No newline at end of file