@@ -8,11 +8,6 @@ namespace IRaCIS.Core.Domain.Share;
|
||||
|
||||
public static class StaticData
|
||||
{
|
||||
|
||||
public static Dictionary<string, string> En_US_Dic = new Dictionary<string, string>();
|
||||
|
||||
public static Dictionary<string, string> Zh_CN_Dic = new Dictionary<string, string>();
|
||||
|
||||
public static Dictionary<string, string> Localizer_Dev_Dic = new Dictionary<string, string>();
|
||||
|
||||
|
||||
@@ -29,24 +24,33 @@ public static class StaticData
|
||||
public static readonly string en_US_bookMark = "en_us";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取国际化
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public static string I18n(string key, params object?[] args)
|
||||
{
|
||||
var isEn_US = System.Globalization.CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
#region 国际化废弃
|
||||
|
||||
//public static Dictionary<string, string> En_US_Dic = new Dictionary<string, string>();
|
||||
|
||||
//public static Dictionary<string, string> Zh_CN_Dic = new Dictionary<string, string>();
|
||||
///// <summary>
|
||||
///// 获取国际化
|
||||
///// </summary>
|
||||
///// <param name="data"></param>
|
||||
///// <returns></returns>
|
||||
//public static string I18n(string key, params object?[] args)
|
||||
//{
|
||||
// var isEn_US = System.Globalization.CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||
|
||||
// if (isEn_US)
|
||||
// {
|
||||
// return En_US_Dic[key];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return Zh_CN_Dic[key];
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
if (isEn_US)
|
||||
{
|
||||
return En_US_Dic[key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return Zh_CN_Dic[key];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user