mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-02 06:06:59 -06:00
Core: GetLngSet(const String& module)
git-svn-id: svn://ultimatepp.org/upp/trunk@3794 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
72258816ea
commit
937459ce58
2 changed files with 21 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ String GetLngString(const char *id);
|
|||
String GetLngString(int lang, const char *id);
|
||||
|
||||
Index<int> GetLngSet();
|
||||
Index<int> GetLngSet(const String& module);
|
||||
void SaveLngFile(FileOut& out, int lang);
|
||||
bool LoadLngFile(const char *file);
|
||||
|
||||
|
|
|
|||
|
|
@ -299,6 +299,26 @@ Index<int> GetLngSet()
|
|||
return ndx;
|
||||
}
|
||||
|
||||
Index<int> GetLngSet(const String& module)
|
||||
{
|
||||
CriticalSection::Lock __(slng);
|
||||
Index<int> ndx;
|
||||
Array<LngModule>& ma = sMod();
|
||||
for(int i = 0; i < ma.GetCount(); i++) {
|
||||
LngModule& m = ma[i];
|
||||
if (m.name != module)
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < m.map.GetCount(); ++j) {
|
||||
Vector<LngRec>& lr = m.map[j];
|
||||
for(int k = 0; k < lr.GetCount(); k++)
|
||||
ndx.FindAdd(lr[k].lang);
|
||||
}
|
||||
}
|
||||
|
||||
return ndx;
|
||||
}
|
||||
|
||||
void SaveLngFile(FileOut& out, int lang)
|
||||
{
|
||||
CriticalSection::Lock __(slng);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue