|
| static void | LoadUserCodes (const TiXmlElement *pRootElement) |
| |
| static void | Clear () |
| |
| static bool | Lookup (const std::string &code, std::string &desc) |
| |
| static 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 language.
|
| |
| static 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.
|
| |
| static std::string | AsISO6392B (const std::string &lang) |
| | Converts a language to a 3-Char ISO 639-2/B code, whatever notation it is given in: 2-Char (ISO 639-1), 3-Char (ISO 639-2/T or ISO 639-2/B), BCP 47 language tag, or full English name.
|
| |
| static bool | ConvertISO6391ToISO6392B (const std::string &strISO6391, std::string &strISO6392B) |
| | Converts a language given as 2-Char (ISO 639-1) to a 3-Char (ISO 639-2/B) code.
|
| |
| static bool | ConvertISO6392ToISO6391 (std::string iso6392, std::string &iso6391) |
| | Converts a language given as 3-Char (ISO 639-2/B or /T) to a 2-Char (ISO 639-1) code.
|
| |
| static bool | ConvertToISO6392B (const std::string &strCharCode, std::string &strISO6392B) |
| | 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.
|
| |
| static std::vector< std::string > | GetLanguageNames (LANGFORMATS format=ISO_639_1, LANG_LIST list=LANG_LIST::DEFAULT) |
| |
| static bool | ConvertToBcp47 (const std::string &text, std::string &bcp47) |
| |
| static std::string | AsBcp47 (const std::string &lang) |
| | Converts a language to a BCP 47 tag, whatever notation it is given in: 2-Char (ISO 639-1), 3-Char (ISO 639-2/T, ISO 639-2/B), BCP 47 language tag, or full English name.
|
| |
|
| static bool | LookupInISO639Tables (const std::string &code, std::string &desc) |
| |
| static std::optional< std::string > | LookupInLangAddons (const std::string &code) |
| | Looks up the language description for the given language code in the installed language addons.
|
| |
| static bool | LookupInUserMap (const std::string &code, std::string &desc) |
| |
| static bool | ReverseLookup (const std::string &desc, std::string &code) |
| | Looks up the ISO 639-1 or ISO 639-2/T, whichever it finds first, code of the given english language name.
|
| |
| static bool | LookupUserCode (const std::string &desc, std::string &userCode) |
| | Looks up the user defined code of the given code or language name.
|
| |
| static STRINGLOOKUPTABLE & | GetUserCodes () |
| | The language codes a user defined in advancedsettings.xml, for media tagged with codes that are not in any standard.
|
| |
| std::string CLangCodeExpander::AsBcp47 |
( |
const std::string & | lang | ) |
|
|
static |
Converts a language to a BCP 47 tag, whatever notation it is given in: 2-Char (ISO 639-1), 3-Char (ISO 639-2/T, ISO 639-2/B), BCP 47 language tag, or full English name.
Widening: BCP 47 adds region, script and variant subtags to ISO 639, so nothing is lost. Intended for the boundaries where a language enters the application.
- Note
- Always returns a value. ConvertToBcp47 reports whether the language was recognized at all.
- Parameters
-
| [in] | lang | The language that should be converted. |
- Returns
- The BCP 47 tag of lang if one exists, lang otherwise.
| std::string CLangCodeExpander::AsISO6392B |
( |
const std::string & | lang | ) |
|
|
static |
Converts a language to a 3-Char ISO 639-2/B code, whatever notation it is given in: 2-Char (ISO 639-1), 3-Char (ISO 639-2/T or ISO 639-2/B), BCP 47 language tag, or full English name.
Narrowing: only the primary language subtag of a BCP 47 tag survives, as region, script and variant subtags have no ISO 639 equivalent. Intended for interfaces with an ISO 639-2/B contract; elsewhere the BCP 47 tag is carried whole.
- Note
- Always returns a value. ConvertToISO6392B reports whether the language was recognized at all.
- Parameters
-
| [in] | lang | The language that should be converted. |
- Returns
- The 3-Char ISO 639-2/B code of lang if that code exists, lang otherwise. A language with no ISO 639-2 code (ISO 639-3/-5 only, ex: zyg) is returned unchanged.