Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 3776a27

Browse files
committed
Use Steam client language setting
1 parent a89d3b7 commit 3776a27

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

TCPingInfoView/I18n/I18n.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text.RegularExpressions;
44
using TCPingInfoView.Properties;
5+
using TCPingInfoView.Steamworks;
56

67
namespace TCPingInfoView.I18n
78
{
@@ -38,8 +39,8 @@ static I18N()
3839
{
3940
Strings = new Dictionary<string, string>();
4041

41-
var name = System.Globalization.CultureInfo.CurrentCulture.Name;
42-
if (name == @"zh" || name == @"zh-CN")
42+
var name = SteamManager.GetCurrentGameLanguage();
43+
if (name == @"schinese")
4344
{
4445
Init(Resources.zh_CN);
4546
}

TCPingInfoView/Steamworks/SteamManager.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ public static void ClearRichPresence()
9292
{
9393
SteamWorksClient.User.ClearRichPresence();
9494
}
95+
96+
public static string GetCurrentGameLanguage()
97+
{
98+
return SteamWorksClient.CurrentLanguage;
99+
}
95100
}
96101

97102
}

0 commit comments

Comments
 (0)