This commit is contained in:
stax76
2023-12-26 16:58:12 +01:00
parent 1048dbed40
commit 6ef9f32d4f
13 changed files with 1743 additions and 1591 deletions

View File

@@ -7,6 +7,8 @@ namespace MpvNet.Windows.WPF;
public class WpfTranslator : ITranslator
{
string _localizerLangauge = "";
static Language[] Languages { get; } = new Language[] {
new("english", "en", "en"),
new("chinese-china", "zh-CN", "zh"), // Chinese (Simplified)
@@ -21,8 +23,11 @@ public class WpfTranslator : ITranslator
void InitNGettextWpf()
{
if (Translation.Localizer == null)
if (Translation.Localizer == null || _localizerLangauge != App.Language)
{
CompositionRoot.Compose("mpvnet", GetCulture(App.Language), Folder.Startup + "Locale");
_localizerLangauge = App.Language;
}
}
string GetSystemLanguage()