StringResources.cs
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
namespace HslCommunication
{
/*******************************************************************************
*
* 用于显示和保存的数据信息,未来支持中英文
*
* Used to the return result class in the synchronize communication and communication for industrial Ethernet
*
*******************************************************************************/
/// <summary>
/// 系统的字符串资源及多语言管理中心 ->
/// System string resource and multi-language management Center
/// </summary>
public static class StringResources
{
#region Constractor
static StringResources()
{
if (System.Globalization.CultureInfo.CurrentCulture.ToString().StartsWith("zh"))
{
SetLanguageChinese();
}
else
{
SeteLanguageEnglish();
}
}
#endregion
/// <summary>
/// 获取或设置系统的语言选项 ->
/// Gets or sets the language options for the system
/// </summary>
public static Language.DefaultLanguage Language = new Language.DefaultLanguage();
/// <summary>
/// 将语言设置为中文 ->
/// Set the language to Chinese
/// </summary>
public static void SetLanguageChinese()
{
Language = new Language.DefaultLanguage();
}
/// <summary>
/// 将语言设置为英文 ->
/// Set the language to English
/// </summary>
public static void SeteLanguageEnglish()
{
Language = new Language.English();
}
}
}