mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-22 01:16:17 +08:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System.Application.UI.ViewModels;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
|
|
namespace System.Application.Services
|
|
{
|
|
/// <summary>
|
|
/// 本地化、多语言服务
|
|
/// </summary>
|
|
public interface ILocalizationService
|
|
{
|
|
CultureInfo DefaultCurrentUICulture { get; }
|
|
|
|
/// <summary>
|
|
/// 更改语言
|
|
/// </summary>
|
|
/// <param name="cultureName"></param>
|
|
void ChangeLanguage(string cultureName);
|
|
|
|
/// <summary>
|
|
/// 绑定资源字符串的视图模型组
|
|
/// </summary>
|
|
ILocalizationViewModel[] ViewModels { get; }
|
|
|
|
public static readonly IList<KeyValuePair<string, string>> Languages;
|
|
|
|
static ILocalizationService()
|
|
{
|
|
Languages = new Dictionary<string, string>()
|
|
{
|
|
{ "", "Auto" },
|
|
{ "zh-Hans", "Chinese(Simplified)" },
|
|
{ "zh-Hant", "Chinese(Traditional)" },
|
|
{ "ja-JP", "Japanese" },
|
|
{ "ru", "Russian" },
|
|
}.ToList();
|
|
}
|
|
}
|
|
} |