Skip to content

Commit

Permalink
SImulator: storage is forced to use Russian language
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirKhil committed Feb 4, 2024
1 parent 0c09811 commit 8ae3ca2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
18 changes: 9 additions & 9 deletions src/SImulator/SImulator/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ protected override void OnStartup(StartupEventArgs e)

UI.Initialize();

if (Settings.Language != null)
{
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Settings.Language);
}
else
{
var currentLanguage = Thread.CurrentThread.CurrentUICulture.Name;
Settings.Language = currentLanguage == "ru-RU" ? currentLanguage : "en-US";
}
//if (Settings.Language != null)
//{
// Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Settings.Language);
//}
//else
//{
// var currentLanguage = Thread.CurrentThread.CurrentUICulture.Name;
// Settings.Language = currentLanguage == "ru-RU" ? currentLanguage : "en-US";
//}

var main = new MainViewModel(Settings);

Expand Down
1 change: 1 addition & 0 deletions src/SImulator/SImulator/Implementation/DesktopManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public override int GetKeyNumber(GameKey key)
{
var storage = ServiceProvider.GetRequiredService<StorageViewModel>();
storage.DefaultRestriction = ((App)Application.Current).Settings.Restriction;
storage.DefaultLanguage = "ru-RU";

storage.PropertyChanged += (s, e) =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>2.15.0.*</ApplicationVersion>
<BootstrapperEnabled>True</BootstrapperEnabled>
<Configuration>Release</Configuration>
Expand Down Expand Up @@ -36,6 +36,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<UpdateRequired>False</UpdateRequired>
<WebPageFileName>index.htm</WebPageFileName>
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
<History>True|2023-10-09T17:28:12.3146788Z;True|2023-10-08T10:09:30.9675119+02:00;True|2023-10-08T09:04:58.7408510+02:00;True|2023-04-05T09:20:34.2222213+02:00;True|2023-04-05T09:19:42.0864925+02:00;True|2023-03-05T12:25:57.0140212+01:00;True|2023-03-05T11:55:02.4267411+01:00;True|2023-03-04T22:04:18.8157069+01:00;True|2023-03-04T22:01:42.5379576+01:00;False|2023-03-04T21:30:31.7645530+01:00;True|2023-01-28T09:23:56.0211677+01:00;True|2023-01-08T11:13:45.0386973+01:00;True|2023-01-08T10:15:52.4694362+01:00;True|2022-12-27T09:14:19.3776898+01:00;</History>
<History>True|2024-02-04T07:36:45.0040548Z;True|2023-10-09T19:28:12.3146788+02:00;True|2023-10-08T10:09:30.9675119+02:00;True|2023-10-08T09:04:58.7408510+02:00;True|2023-04-05T09:20:34.2222213+02:00;True|2023-04-05T09:19:42.0864925+02:00;True|2023-03-05T12:25:57.0140212+01:00;True|2023-03-05T11:55:02.4267411+01:00;True|2023-03-04T22:04:18.8157069+01:00;True|2023-03-04T22:01:42.5379576+01:00;False|2023-03-04T21:30:31.7645530+01:00;True|2023-01-28T09:23:56.0211677+01:00;True|2023-01-08T11:13:45.0386973+01:00;True|2023-01-08T10:15:52.4694362+01:00;True|2022-12-27T09:14:19.3776898+01:00;</History>
</PropertyGroup>
</Project>

0 comments on commit 8ae3ca2

Please sign in to comment.