mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
feat: set default language to zh-cn
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!-- 默认语言文件,这个资源会被动态修改,所以需要放在第一位 -->
|
||||
<!-- Reference: Helper/Localization.cs -->
|
||||
<ResourceDictionary Source="/MeoAsstGui;component/Resources/Localizations/en-us.xaml"/>
|
||||
<ResourceDictionary Source="/MeoAsstGui;component/Resources/Localizations/zh-cn.xaml" />
|
||||
<s:ApplicationLoader>
|
||||
<s:ApplicationLoader.Bootstrapper>
|
||||
<local:Bootstrapper />
|
||||
|
||||
@@ -18,9 +18,10 @@ namespace MeoAsstGui
|
||||
{
|
||||
public class Localization
|
||||
{
|
||||
private static string culture = ViewStatusStorage.Get("GUI.Localization", "zh-cn");
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
var culture = ViewStatusStorage.Get("GUI.Localization", "en-us");
|
||||
var cultureInfo = new CultureInfo(culture);
|
||||
Thread.CurrentThread.CurrentUICulture = cultureInfo;
|
||||
Thread.CurrentThread.CurrentCulture = cultureInfo;
|
||||
@@ -34,7 +35,6 @@ namespace MeoAsstGui
|
||||
|
||||
public static string GetString(string key)
|
||||
{
|
||||
var culture = ViewStatusStorage.Get("GUI.Localization", "en-us");
|
||||
var dictionary = new ResourceDictionary
|
||||
{
|
||||
Source = new Uri($@"Resources\Localizations\{culture}.xaml", UriKind.Relative)
|
||||
|
||||
Reference in New Issue
Block a user