mirror of
https://github.com/XFox111/GUTSchedule.git
synced 2026-04-22 06:58:01 +03:00
Enabled language auto-switch for UWP
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.UI.Popups;
|
||||
@@ -19,7 +20,11 @@ namespace GUTSchedule.UWP
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
if ((new string[] { "ua", "ru", "by", "kz", "kg", "md", "lv", "ee" }).Contains(Windows.System.UserProfile.GlobalizationPreferences.Languages[0].Split('-')[0]))
|
||||
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "ru";
|
||||
else
|
||||
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "en";
|
||||
|
||||
InitializeComponent();
|
||||
Suspending += OnSuspending;
|
||||
UnhandledException += OnError;
|
||||
|
||||
Reference in New Issue
Block a user