v1.2
This commit is contained in:
36
FSI.BT.Tools/Global/Utilities/Translator.cs
Normal file
36
FSI.BT.Tools/Global/Utilities/Translator.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// <copyright file="Translator.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
namespace FSI.BT.Tools.Global.Utilities
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Resources;
|
||||
using FSI.BT.Tools.SystemTrayMenu.UserInterface;
|
||||
|
||||
internal static class Translator
|
||||
{
|
||||
private static CultureInfo culture;
|
||||
|
||||
internal static void Initialize()
|
||||
{
|
||||
if (string.IsNullOrEmpty(
|
||||
Vars.SystemTrayMenuSettings.CurrentCultureInfoName))
|
||||
{
|
||||
Vars.SystemTrayMenuSettings.CurrentCultureInfoName = "de";
|
||||
//Global.Vars.SystemTrayMenuSettings.Save();
|
||||
}
|
||||
|
||||
culture = CultureInfo.CreateSpecificCulture(
|
||||
Vars.SystemTrayMenuSettings.CurrentCultureInfoName);
|
||||
}
|
||||
|
||||
internal static string GetText(string id)
|
||||
{
|
||||
ResourceManager rm = new(
|
||||
"FSI.BT.Tools.Global.Resources.Languages.lang",
|
||||
typeof(Menu).Assembly);
|
||||
return rm.GetString(id, culture);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user