
8 changed files with 173 additions and 80 deletions
@ -0,0 +1,37 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
|
|||
namespace W10SS_GUI |
|||
{ |
|||
internal class AppCulture |
|||
{ |
|||
private class Culture |
|||
{ |
|||
internal const string EN = "en"; |
|||
internal const string RU = "ru"; |
|||
} |
|||
|
|||
private string _culture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == Culture.RU ? Culture.RU : Culture.EN; |
|||
private ResourceDictionary resourceDictionaryEn = new ResourceDictionary() { Source = new Uri("pack://application:,,,/Localized/EN.xaml", UriKind.Absolute) }; |
|||
private ResourceDictionary resourceDictionaryRu = new ResourceDictionary() { Source = new Uri("pack://application:,,,/Localized/RU.xaml", UriKind.Absolute) }; |
|||
internal ResourceDictionary CurrentCulture |
|||
{ |
|||
get |
|||
{ |
|||
return _culture == Culture.RU ? resourceDictionaryRu : resourceDictionaryEn; |
|||
} |
|||
} |
|||
|
|||
internal ResourceDictionary ChangeCulture() |
|||
{ |
|||
if (_culture == Culture.RU) _culture = Culture.EN; |
|||
else _culture = Culture.RU; |
|||
return _culture == Culture.RU ? resourceDictionaryRu : resourceDictionaryEn; |
|||
} |
|||
} |
|||
} |
@ -1,5 +1,24 @@ |
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:local="clr-namespace:W10SS_GUI.Localized"> |
|||
|
|||
xmlns:local="clr-namespace:W10SS_GUI.Localized" |
|||
xmlns:system="clr-namespace:System;assembly=mscorlib"> |
|||
<system:String x:Key="textWindowTitle">Windows 10 Setup Script</system:String> |
|||
|
|||
<system:String x:Key="textHamburgerPrivacy">Телеметрия</system:String> |
|||
<system:String x:Key="textHamburgerUi">Персонализация</system:String> |
|||
<system:String x:Key="textHamburgerOneDrive">OneDrive</system:String> |
|||
<system:String x:Key="textHamburgerSystem">Система</system:String> |
|||
<system:String x:Key="textHamburgerStartMenu">Меню "Пуск"</system:String> |
|||
<system:String x:Key="textHamburgerUwp">UWP Приложения</system:String> |
|||
<system:String x:Key="textHamburgerWinGame">Игровой режим</system:String> |
|||
<system:String x:Key="textHamburgerTaskScheduler">Планировщик</system:String> |
|||
<system:String x:Key="textHamburgerDefender">Microsoft Defender</system:String> |
|||
<system:String x:Key="textHamburgerContextMenu">Контекстное меню</system:String> |
|||
|
|||
<system:String x:Key="textHamburgerApply">Применить</system:String> |
|||
<system:String x:Key="textHamburgerSave">Сохранить</system:String> |
|||
<system:String x:Key="textHamburgerLoad">Импортировать</system:String> |
|||
<system:String x:Key="textHamburgerLanguage">English</system:String> |
|||
<system:String x:Key="textHamburgerOpenGithub">GitHub</system:String> |
|||
|
|||
</ResourceDictionary> |
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
|
|||
namespace W10SS_GUI.Model |
|||
{ |
|||
class ModelGui |
|||
{ |
|||
|
|||
} |
|||
} |
Binary file not shown.
Loading…
Reference in new issue