mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-29 00:10:02 -05:00
impr: Rewrite Localization Manager to use more standard format and load localizations on the fly
This commit is contained in:
@@ -17,8 +17,9 @@ using namespace hex::plugin::visualizers;
|
||||
|
||||
IMHEX_PLUGIN_SETUP("Visualizers", "WerWolv", "Visualizers for the Pattern Language") {
|
||||
hex::log::debug("Using romfs: '{}'", romfs::name());
|
||||
for (auto &path : romfs::list("lang"))
|
||||
hex::ContentRegistry::Language::addLocalization(nlohmann::json::parse(romfs::get(path).string()));
|
||||
hex::LocalizationManager::addLanguages(romfs::get("lang/languages.json").string(), [](const std::filesystem::path &path) {
|
||||
return romfs::get(path).string();
|
||||
});
|
||||
|
||||
registerPatternLanguageVisualizers();
|
||||
registerPatternLanguageInlineVisualizers();
|
||||
|
||||
Reference in New Issue
Block a user