[General]Support language selection (#34971)

* Language setting

* spellcheck

* Set FileLocksmithContextMenu package version in AppManifest.xml

* Fix ambigious symbol build error

* Fix ambigious symbol build error #2

* Revert unneeded changes

* Improve perf

* try fix ci build
This commit is contained in:
Stefan Markovic
2024-09-25 22:20:15 +02:00
committed by GitHub
parent 2b4b55cfeb
commit 5b616c9eed
38 changed files with 754 additions and 25 deletions

View File

@@ -9,6 +9,7 @@
#include <common/logger/logger.h>
#include <common/logger/logger_settings.h>
#include <common/utils/language_helper.h>
#include <common/utils/logger_helper.h>
#include <common/utils/gpo.h>
@@ -33,6 +34,12 @@ const std::wstring moduleName = L"PowerRename";
/// </summary>
App::App()
{
std::wstring appLanguage = LanguageHelpers::load_language();
if (!appLanguage.empty())
{
Microsoft::Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride(appLanguage);
}
InitializeComponent();
#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION