-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStrings.cs
More file actions
41 lines (34 loc) · 1.9 KB
/
Copy pathStrings.cs
File metadata and controls
41 lines (34 loc) · 1.9 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
using System.Globalization;
namespace Jnob;
public enum Lang { TH, EN }
/// <summary>Tiny two-language string table. "Auto" follows the OS UI language.</summary>
public static class Strings
{
public static Lang Current { get; private set; } = Lang.EN;
public static void Set(string pref)
{
Current = pref switch
{
"TH" => Lang.TH,
"EN" => Lang.EN,
_ => CultureInfo.CurrentUICulture.TwoLetterISOLanguageName
.Equals("th", StringComparison.OrdinalIgnoreCase) ? Lang.TH : Lang.EN
};
}
private static string T(string th, string en) => Current == Lang.TH ? th : en;
// OSD
public static string MasterName => T("ลำโพงหลัก (ระบบ)", "Master (System)");
public static string TapToSwitch => T("แตะเพื่อสลับ", "tap to switch");
public static string NotPlaying => T("ไม่ได้เล่นเสียงอยู่", "No audio playing");
public static string Muted => T("ปิดเสียง", "Muted");
// Tray menu
public static string PickHeader => T("เลือกโปรแกรมให้ knob คุม", "Choose what the knob controls");
public static string Autostart => T("เปิดตอน Windows เริ่ม", "Start with Windows");
public static string Exit => T("ออกจากโปรแกรม", "Exit");
public static string LanguageMenu => T("ภาษา", "Language");
public static string ThemeMenu => T("ธีม", "Theme");
public static string ThemeAuto => T("อัตโนมัติ (ตามระบบ)", "Automatic (system)");
public static string ThemeLight => T("สว่าง", "Light");
public static string ThemeDark => T("มืด", "Dark");
public static string LangAuto => T("อัตโนมัติ (ตามระบบ)", "Automatic (system)");
}