COMMON: Get accessor methods to the platform and language lists
This commit is contained in:
parent
b65e00a6ef
commit
30f3e0eceb
4 changed files with 30 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "common/language.h"
|
||||
#include "common/gui_options.h"
|
||||
#include "common/str.h"
|
||||
#include "common/algorithm.h"
|
||||
|
||||
namespace Common {
|
||||
|
||||
|
@ -178,4 +179,15 @@ const String getGameGUIOptionsDescriptionLanguage(Language lang) {
|
|||
return String("lang_") + getLanguageDescription(lang);
|
||||
}
|
||||
|
||||
List<String> getLanguageList() {
|
||||
List<String> list;
|
||||
|
||||
for (const LanguageDescription *l = g_languages; l->code; ++l)
|
||||
list.push_back(l->code);
|
||||
|
||||
Common::sort(list.begin(), list.end());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue