From e0be296fda5f66e058932e4cdc2dc25e86bf430f Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Wed, 22 Aug 2018 00:35:41 +0300 Subject: [PATCH] Language switch, localization development 4 --- FoxTube/App.xaml.cs | 6 + FoxTube/FoxTube.csproj | 15 +- FoxTube/Pages/CommentsPage.xaml | 10 +- FoxTube/Pages/Settings.xaml | 8 +- FoxTube/Pages/SettingsPages/About.xaml | 28 ++-- FoxTube/Pages/SettingsPages/General.xaml | 49 ++++--- FoxTube/Pages/SettingsPages/General.xaml.cs | 14 +- FoxTube/Pages/SettingsPages/Inbox.xaml | 10 +- .../Strings/en-US/{Settings => }/About.resw | 0 FoxTube/Strings/en-US/CommentsPage.resw | 135 ++++++++++++++++++ .../Strings/en-US/{Settings => }/General.resw | 3 + .../Strings/en-US/{Settings => }/Inbox.resw | 0 .../en-US/{Settings => }/Translate.resw | 0 .../Strings/ru-RU/{Settings => }/About.resw | 0 .../Strings/ru-RU/{Settings => }/General.resw | 3 + .../Strings/ru-RU/{Settings => }/Inbox.resw | 0 16 files changed, 220 insertions(+), 61 deletions(-) rename FoxTube/Strings/en-US/{Settings => }/About.resw (100%) create mode 100644 FoxTube/Strings/en-US/CommentsPage.resw rename FoxTube/Strings/en-US/{Settings => }/General.resw (98%) rename FoxTube/Strings/en-US/{Settings => }/Inbox.resw (100%) rename FoxTube/Strings/en-US/{Settings => }/Translate.resw (100%) rename FoxTube/Strings/ru-RU/{Settings => }/About.resw (100%) rename FoxTube/Strings/ru-RU/{Settings => }/General.resw (98%) rename FoxTube/Strings/ru-RU/{Settings => }/Inbox.resw (100%) diff --git a/FoxTube/App.xaml.cs b/FoxTube/App.xaml.cs index b2ba3c7..0fb44a2 100644 --- a/FoxTube/App.xaml.cs +++ b/FoxTube/App.xaml.cs @@ -8,6 +8,7 @@ using Windows.ApplicationModel.Activation; using Windows.ApplicationModel.Core; using Windows.Foundation; using Windows.Foundation.Collections; +using Windows.Globalization; using Windows.Storage; using Windows.UI.Core; using Windows.UI.Xaml; @@ -44,6 +45,11 @@ namespace FoxTube break; } } catch { } + try + { + ApplicationLanguages.PrimaryLanguageOverride = (string)settings.Values["language"]; + } + catch { } this.InitializeComponent(); this.Suspending += OnSuspending; } diff --git a/FoxTube/FoxTube.csproj b/FoxTube/FoxTube.csproj index 02b02cb..014243e 100644 --- a/FoxTube/FoxTube.csproj +++ b/FoxTube/FoxTube.csproj @@ -431,16 +431,17 @@ + - - - + + + - - - - + + + + Designer diff --git a/FoxTube/Pages/CommentsPage.xaml b/FoxTube/Pages/CommentsPage.xaml index d2cbfe4..dbaa61b 100644 --- a/FoxTube/Pages/CommentsPage.xaml +++ b/FoxTube/Pages/CommentsPage.xaml @@ -18,24 +18,24 @@ - + diff --git a/FoxTube/Pages/Settings.xaml b/FoxTube/Pages/Settings.xaml index d8dfadb..6312e62 100644 --- a/FoxTube/Pages/Settings.xaml +++ b/FoxTube/Pages/Settings.xaml @@ -11,22 +11,22 @@ - + - + - + - + diff --git a/FoxTube/Pages/SettingsPages/About.xaml b/FoxTube/Pages/SettingsPages/About.xaml index 5f80be8..3849599 100644 --- a/FoxTube/Pages/SettingsPages/About.xaml +++ b/FoxTube/Pages/SettingsPages/About.xaml @@ -28,29 +28,29 @@ - + - + - - Twitter: @XFox_Mike - Vkontakte: @XFox.Mike + + Twitter: @XFox_Mike + Vkontakte: @XFox.Mike YouTube: @FoxGameStudioChannel E-mail: michael.xfox@outlook.com - My blog (Russian language only):https://michael-xfox.com + My blog (Russian language only): https://michael-xfox.com - - - - - - - -