Skip to content

Commit 2aff98b

Browse files
committed
enhance: it's not necessary to change thread's culture
1 parent cc0a223 commit 2aff98b

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/App.axaml.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,6 @@ app.Resources[localeKey] is not ResourceDictionary targetLocale ||
195195
if (app._activeLocale != null)
196196
app.Resources.MergedDictionaries.Remove(app._activeLocale);
197197

198-
try
199-
{
200-
var culture = CultureInfo.GetCultureInfo(localeKey.Replace("_", "-"));
201-
Thread.CurrentThread.CurrentUICulture = culture;
202-
Thread.CurrentThread.CurrentCulture = culture;
203-
}
204-
catch
205-
{
206-
// Just ignore
207-
}
208-
209198
app.Resources.MergedDictionaries.Add(targetLocale);
210199
app._activeLocale = targetLocale;
211200
}

0 commit comments

Comments
 (0)