0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 09:50:43 -05:00

35 lines
963 B
C#
Raw Normal View History

2023-03-03 19:25:33 +00:00
/* LocaleCollection.cs
* License: NCSA Open Source License
*
2024-05-21 20:15:19 +01:00
* Copyright: SPT
2023-03-03 19:25:33 +00:00
* AUTHORS:
* waffle.lord
*/
2024-05-21 20:15:19 +01:00
using SPT.Launcher.Helpers;
2023-03-03 19:25:33 +00:00
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using SPT.Launcher.Utilities;
2023-03-03 19:25:33 +00:00
2024-05-21 20:15:19 +01:00
namespace SPT.Launcher.Models.Launcher
2023-03-03 19:25:33 +00:00
{
public class LocaleCollection : NotifyPropertyChangedBase
2023-03-03 19:25:33 +00:00
{
private string _selectedLocale;
2023-03-03 19:25:33 +00:00
public string SelectedLocale
{
get => _selectedLocale;
set => SetProperty(ref _selectedLocale, value, () => LocalizationProvider.LoadLocalByName(value));
2023-03-03 19:25:33 +00:00
}
public ObservableCollection<string> AvailableLocales { get; set; } = LocalizationProvider.GetAvailableLocales();
public LocaleCollection()
{
SelectedLocale = LocalizationProvider.LocaleNameDictionary.GetValueOrDefault(LauncherSettingsProvider.Instance.DefaultLocale, "English");
}
}
}