mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 01:36:31 +02:00
[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:
@@ -3,6 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information. Code forked from Brice Lambson's https://github.com/bricelam/ImageResizer/
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
@@ -19,6 +20,19 @@ namespace ImageResizer
|
||||
{
|
||||
static App()
|
||||
{
|
||||
try
|
||||
{
|
||||
string appLanguage = LanguageHelper.LoadLanguage();
|
||||
if (!string.IsNullOrEmpty(appLanguage))
|
||||
{
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(appLanguage);
|
||||
}
|
||||
}
|
||||
catch (CultureNotFoundException)
|
||||
{
|
||||
// error
|
||||
}
|
||||
|
||||
Console.InputEncoding = Encoding.Unicode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user