mirror of
https://github.com/Ylianst/MeshCentralRouter
synced 2025-12-26 21:23:18 +00:00
Fixed multi-display switch when non-english language.
This commit is contained in:
11
Translate.cs
11
Translate.cs
@@ -2847,6 +2847,17 @@ namespace MeshCentralRouter
|
||||
return english;
|
||||
}
|
||||
|
||||
static public string T(string english, string lang)
|
||||
{
|
||||
if (lang == "en") return english;
|
||||
if (translationTable.ContainsKey(english))
|
||||
{
|
||||
Dictionary<string, string> translations = translationTable[english];
|
||||
if (translations.ContainsKey(lang)) return translations[lang];
|
||||
}
|
||||
return english;
|
||||
}
|
||||
|
||||
static public void TranslateControl(Control control)
|
||||
{
|
||||
control.Text = T(control.Text);
|
||||
|
||||
Reference in New Issue
Block a user