41 INCLUDE_ADDONS_USERDEFINED,
44 void LoadUserCodes(
const TiXmlElement* pRootElement);
47 bool Lookup(
const std::string&
code, std::string& desc);
48 bool Lookup(
const int code, std::string& desc);
89 static bool ConvertISO6391ToISO6392B(
const std::string& strISO6391, std::string& strISO6392B,
bool checkWin32Locales =
false);
99 bool ConvertToISO6392B(
const std::string& strCharCode, std::string& strISO6392B,
bool checkWin32Locales =
false);
109 bool ConvertToISO6392T(
const std::string& strCharCode, std::string& strISO6392T,
bool checkWin32Locales =
false);
127 static std::string FindLanguageCodeWithSubtag(
const std::string& str);
129 #ifdef TARGET_WINDOWS 130 static bool ConvertISO31661Alpha2ToISO31661Alpha3(
const std::string& strISO31661Alpha2, std::string& strISO31661Alpha3);
131 static bool ConvertWindowsLanguageCodeToISO6392B(
const std::string& strWindowsLanguageCode, std::string& strISO6392B);
140 std::vector<std::string> GetLanguageNames(LANGFORMATS format = ISO_639_1,
141 LANG_LIST list = LANG_LIST::DEFAULT);
150 static std::string CodeToString(
long code);
152 static bool LookupInISO639Tables(
const std::string& code, std::string& desc);
161 static bool LookupInLangAddons(
const std::string& code, std::string& desc);
163 bool LookupInUserMap(
const std::string& code, std::string& desc);
171 bool ReverseLookup(
const std::string& desc, std::string& code);
179 bool LookupUserCode(
const std::string& desc, std::string &userCode);
181 typedef std::map<std::string, std::string> STRINGLOOKUPTABLE;
182 STRINGLOOKUPTABLE m_mapUser;
bool ReverseLookup(const std::string &desc, std::string &code)
Looks up the ISO 639-1, ISO 639-2/T, or ISO 639-2/B, whichever it finds first, code of the given engl...
Definition: LangCodeExpander.cpp:358
Definition: LangCodeExpander.h:17
bool CompareISO639Codes(const std::string &code1, const std::string &code2)
Determines if two languages given as ISO 639-1, ISO 639-2/T, or ISO 639-2/B codes represent the same ...
Definition: LangCodeExpander.cpp:546
bool ConvertToISO6391(const std::string &lang, std::string &code)
Converts a language given as 2-Char (ISO 639-1), 3-Char (ISO 639-2/T or ISO 639-2/B), or full english name string to a 2-Char (ISO 639-1) code.
Definition: LangCodeExpander.cpp:294
std::string ConvertToISO6392B(const std::string &lang)
Converts a language given as 2-Char (ISO 639-1), 3-Char (ISO 639-2/T or ISO 639-2/B), or full english name string to a 3-Char ISO 639-2/B code.
Definition: LangCodeExpander.cpp:562
bool CompareFullLanguageNames(const std::string &lang1, const std::string &lang2)
Determines if two english language names represent the same language.
Definition: LangCodeExpander.cpp:488
bool ConvertToISO6392T(const std::string &strCharCode, std::string &strISO6392T, bool checkWin32Locales=false)
Converts a language given as 2-Char (ISO 639-1), 3-Char (ISO 639-2/T or ISO 639-2/B), or full english name string to a 3-Char ISO 639-2/T code.
Definition: LangCodeExpander.cpp:217
Definition: inftrees.h:24
static bool ConvertISO6391ToISO6392B(const std::string &strISO6391, std::string &strISO6392B, bool checkWin32Locales=false)
Converts a language given as 2-Char (ISO 639-1) to a 3-Char (ISO 639-2/T) code.
Definition: LangCodeExpander.cpp:133
bool LookupUserCode(const std::string &desc, std::string &userCode)
Looks up the user defined code of the given code or language name.
Definition: LangCodeExpander.cpp:238