mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Choose tracks based on language, if possible
This commit is contained in:
@ -56,6 +56,17 @@ const char* plLocalization::fLangTags[] =
|
||||
};
|
||||
const int kLangTagLen = 4;
|
||||
|
||||
// ISO 639, e.g. used in video tracks
|
||||
std::set<plString> plLocalization::fLangCodes[] =
|
||||
{
|
||||
{"eng", "en"},
|
||||
{"fre", "fra", "fr"},
|
||||
{"ger", "deu", "de"},
|
||||
{"spa", "es"},
|
||||
{"ita", "it"},
|
||||
{"jpn", "ja"}
|
||||
};
|
||||
|
||||
const char* plLocalization::fLangNames[] =
|
||||
{
|
||||
"English", // kEnglish
|
||||
|
@ -44,6 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include "plFileSystem.h"
|
||||
|
||||
class plLocalization
|
||||
@ -78,6 +79,7 @@ public:
|
||||
protected:
|
||||
static Language fLanguage;
|
||||
static const char* fLangTags[kNumLanguages];
|
||||
static std::set<plString> fLangCodes[kNumLanguages];
|
||||
static const char* fLangNames[kNumLanguages];
|
||||
static bool fUsesUnicode[kNumLanguages];
|
||||
static encodingTypes fUnicodeEncoding[kNumLanguages];
|
||||
@ -89,6 +91,7 @@ public:
|
||||
static Language GetLanguage() { return fLanguage; }
|
||||
|
||||
static const char* GetLanguageName(Language lang) { return fLangNames[lang]; }
|
||||
static std::set<plString> GetLanguageCodes(Language lang) { return fLangCodes[lang]; }
|
||||
|
||||
static bool UsingUnicode() { return fUsesUnicode[fLanguage]; }
|
||||
static encodingTypes UnicodeEncoding() { return fUnicodeEncoding[fLanguage]; }
|
||||
|
Reference in New Issue
Block a user