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:
parent
7a9df46830
commit
7de589e275
7 changed files with 215 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue