1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-13 10:00:43 +00:00

Add custom upper<->lowercase translation tables for better localization support.

Translation tables by Henrik Holst.
This commit is contained in:
fgenesis 2013-11-14 17:58:33 +01:00
commit 7de589e275
7 changed files with 215 additions and 18 deletions

View file

@ -1293,6 +1293,8 @@ void Core::init()
initInputCodeMap();
initLocalization();
//glfwSetWindowSizeCallback(lockWindowSize);
}
@ -5164,3 +5166,23 @@ void Core::setupFileAccess()
debugLog("Done");
#endif
}
void Core::initLocalization()
{
InStream in(localisePath("data/localecase.txt"));
if(!in)
{
debugLog("data/localecase.txt does not exist, using internal locale data");
return;
}
std::string low, up;
std::map<unsigned char, unsigned char> trans;
while(in)
{
in >> low >> up;
trans[low[0]] = up[0];
}
initCharTranslationTables(trans);
}