Replies: 2 comments
-
Maybe I am mistaken here, but this implies, that no changes in the language-file - or adding a language-file - is possible after it has been compiled. Can't we find a common ground here? Maybe loading the |
Beta Was this translation helpful? Give feedback.
-
The maps have some memory allocation at run-time but I don't see if they have something to do with language files, e.g., With a little modification, as the next step, we can even make it better:
With |
Beta Was this translation helpful? Give feedback.
-
This is a first step to using a
std::map
rather thanlanguage.json
file utilized in my currentpr
.std::map
s functionalities seem easier to treat, more beneficial, and reducing codebase in general:To see the consequence on decreasing code line on the one hand and increasing readability on the other hand, take a look at these two lines:
if (ImGui::BeginMenu(appLanguage["Help"]))
Using a
std::map
initialized at compile-time compared to loading a.json
file several times at run-time could lead to much better performance not only on small devices with a Linux distro - capable of running the project - but also on PCes, I assume.Beta Was this translation helpful? Give feedback.
All reactions