Get default langauge
This commit is contained in:
parent
8930b789d6
commit
5c2a559487
3 changed files with 26 additions and 1 deletions
|
|
@ -235,6 +235,19 @@ const char *LanguageMetadata(const char *key)
|
|||
return it->second;
|
||||
}
|
||||
|
||||
bool HasTranslation(const std::string &locale)
|
||||
{
|
||||
std::string gmoPath = paths::LangPath() + "./" + locale + ".gmo";
|
||||
if (FileExists(gmoPath.c_str()))
|
||||
return true;
|
||||
|
||||
std::string moPath = paths::LangPath() + "./" + locale + ".mo";
|
||||
if (FileExists(moPath.c_str()))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LanguageInitialize()
|
||||
{
|
||||
FILE *fp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue