Working on translations
This commit is contained in:
1 parent
9d8ca865c7
commit
e2d9105b02
18 files changed
+271
-88
No files matched your search
@@ -14,6 +14,15 @@ extern Language g_currentLanguage;
|
||||
std::string languageToCode(Language lang);
|
||||
Language languageFromCode(const std::string& code);
|
||||
|
||||
// "resources/config/items.json" + English -> "resources/config_en/items.json".
|
||||
// Returns basePath unchanged if it doesn't contain a "/config/" segment.
|
||||
std::string localizedConfigPath(const std::string& basePath, Language lang);
|
||||
|
||||
// Reads basePath, preferring the config_<lang> variant for g_currentLanguage;
|
||||
// falls back to basePath if the localized file/zip-entry is missing or empty.
|
||||
// zipFile empty => loose files from disk; non-empty => entries inside that zip.
|
||||
std::string readLocalizedConfigFile(const std::string& basePath, const std::string& zipFile);
|
||||
|
||||
// Reads the "language" field from settings.json (if present) and updates
|
||||
// g_currentLanguage. Safe to call even if settings.json doesn't exist yet.
|
||||
// Must run before any location/dialogue content is loaded, since some
|
||||
|
||||
Reference in new issue
Block a user