Working on translations for dialogs and cutscenes

This commit is contained in:
Vladislav Khorev committed 2026-07-05 21:52:37 +03:00
1 parent a98f71676d
commit 794a820be9
25 files changed
+3015 -123

No files matched your search

+9 -2
View File
@@ -1,5 +1,6 @@
#include "MenuManager.h"
#include "Game.h"
#include "Localization.h"
#include "render/TextRenderer.h"
#include "utils/Utils.h"
#include <iostream>
@@ -412,10 +413,10 @@ namespace ZL {
});
uiManager.setTextButtonCallback("languageRussianButton", [this](const std::string&) {
ZL::g_currentLanguage = ZL::Language::Russian;
});
uiManager.setTextButtonCallback("languageEnglishButton", [this](const std::string&) {
ZL::g_currentLanguage = ZL::Language::English;
});
}
@@ -1821,6 +1822,7 @@ namespace ZL {
root["musicEnabled"] = audioPlayer_.isMusicEnabled();
root["soundEnabled"] = audioPlayer_.isSoundEnabled();
root["fullscreen"] = Environment::isFullscreen;
root["language"] = ZL::languageToCode(ZL::g_currentLanguage);
std::ofstream file("settings.json");
if (file.is_open()) {
@@ -1835,6 +1837,11 @@ namespace ZL {
// directly in the right fullscreen state (see WIN32 main() in main.cpp) to avoid
// a windowed -> fullscreen flash. The block below just keeps Environment::isFullscreen
// in sync in case this is ever called from a path that didn't pre-apply it.
// Language is loaded separately, even earlier (see ZL::loadLanguageSetting()
// callers), because some location scripts start a dialogue as soon as they're
// loaded, before this function ever runs.
ZL::loadLanguageSetting();
const std::string content = ZL::readTextFile("settings.json");
if (content.empty()) return;
try {