Merge pull request #716 from Flow-Launcher/CulturalInfoChange

change cultural info when switching language
This commit is contained in:
Jeremy Wu 2021-11-03 06:59:13 +11:00 committed by GitHub
commit 267f9dda58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Logger;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using System.Globalization;
namespace Flow.Launcher.Core.Resource
{
@ -96,7 +97,8 @@ namespace Flow.Launcher.Core.Resource
}
UpdatePluginMetadataTranslations();
Settings.Language = language.LanguageCode;
CultureInfo.CurrentCulture = new CultureInfo(language.LanguageCode);
CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture;
}
public bool PromptShouldUsePinyin(string languageCodeToSet)