MythTV  master
Typedefs | Functions | Variables
iso639.cpp File Reference
#include "iso639.h"
#include "mythcorecontext.h"
#include <QStringList>
Include dependency graph for iso639.cpp:

Go to the source code of this file.

Typedefs

using ISO639ToNameMap = QMap< QString, QString >
 

Functions

static int createCodeToEnglishNamesMap (QMap< int, QString > &names)
 Generated from http://www.loc.gov/standards/iso639-2/ascii_8bits.html using awk script: cat ISO-639-2_values_8bits.txt | \ awk -F'|' \ '{printf " names[iso639_str3_to_key(\"s")] = QString("s");
", \ $1, $4}'. More...
 
static int createCode2ToCode3Map (QMap< int, int > &codemap)
 
static int createCodeToCanonicalCodeMap (QMap< int, int > &canonical)
 
void iso639_clear_language_list (void)
 
QStringList iso639_get_language_list (void)
 Returns list of three character ISO-639 language descriptors, starting with the most preferred. More...
 
vector< int > iso639_get_language_key_list (void)
 
QString iso639_str2_to_str3 (const QString &str2)
 
static QString iso639_Alpha3_toName (const unsigned char *iso639_2)
 
static QString iso639_Alpha2_toName (const unsigned char *iso639_1)
 
QString iso639_str_toName (const unsigned char *iso639)
 Converts a 2 or 3 character iso639 string to a language name in English. More...
 
QString iso639_key_toName (int iso639_2)
 Converts a canonical key to language name in English. More...
 
int iso639_key_to_canonical_key (int iso639_2)
 
static ISO639ToNameMap createLanguageMap (void)
 
QString GetISO639LanguageName (const QString &iso639_1)
 
QString GetISO639EnglishLanguageName (const QString &iso639_1)
 

Variables

QMap< int, QString > _iso639_key_to_english_name
 
static QMap< int, int > _iso639_key2_to_key3
 
static QMap< int, int > _iso639_key3_to_canonical_key3
 
static QStringList _languages
 
static vector< int > _language_keys
 
int dummy_createCodeToEnglishNamesMap
 
int dummy_createCode2ToCode3Map
 
int dummy_createCodeToCanonicalCodeMap
 
static ISO639ToNameMap gLanguageMap
 

Typedef Documentation

◆ ISO639ToNameMap

using ISO639ToNameMap = QMap<QString, QString>

Definition at line 876 of file iso639.cpp.

Function Documentation

◆ createCodeToEnglishNamesMap()

static int createCodeToEnglishNamesMap ( QMap< int, QString > &  names)
static

Generated from http://www.loc.gov/standards/iso639-2/ascii_8bits.html using awk script: cat ISO-639-2_values_8bits.txt | \ awk -F'|' \ '{printf " names[iso639_str3_to_key(\"s")] = QString("s");
", \ $1, $4}'.

with hand editing for duplicates ("ger"=="deu").

Definition at line 178 of file iso639.cpp.

◆ createCode2ToCode3Map()

static int createCode2ToCode3Map ( QMap< int, int > &  codemap)
static

Definition at line 662 of file iso639.cpp.

◆ createCodeToCanonicalCodeMap()

static int createCodeToCanonicalCodeMap ( QMap< int, int > &  canonical)
static

Definition at line 140 of file iso639.cpp.

◆ iso639_clear_language_list()

void iso639_clear_language_list ( void  )

Definition at line 24 of file iso639.cpp.

◆ iso639_get_language_list()

QStringList iso639_get_language_list ( void  )

Returns list of three character ISO-639 language descriptors, starting with the most preferred.

See also
MythContext::GetLanguage()

Definition at line 35 of file iso639.cpp.

Referenced by EITScanner::EITScanner(), and iso639_get_language_key_list().

◆ iso639_get_language_key_list()

vector<int> iso639_get_language_key_list ( void  )

Definition at line 58 of file iso639.cpp.

◆ iso639_str2_to_str3()

QString iso639_str2_to_str3 ( const QString &  str2)

◆ iso639_Alpha3_toName()

static QString iso639_Alpha3_toName ( const unsigned char *  iso639_2)
static

Definition at line 81 of file iso639.cpp.

Referenced by iso639_str_toName().

◆ iso639_Alpha2_toName()

static QString iso639_Alpha2_toName ( const unsigned char *  iso639_1)
static

Definition at line 92 of file iso639.cpp.

Referenced by iso639_str_toName().

◆ iso639_str_toName()

QString iso639_str_toName ( const unsigned char *  iso639)

Converts a 2 or 3 character iso639 string to a language name in English.

Definition at line 102 of file iso639.cpp.

◆ iso639_key_toName()

QString iso639_key_toName ( int  iso639_2)

◆ iso639_key_to_canonical_key()

int iso639_key_to_canonical_key ( int  iso639_2)

◆ createLanguageMap()

static ISO639ToNameMap createLanguageMap ( void  )
static

Definition at line 877 of file iso639.cpp.

Referenced by GetISO639LanguageName().

◆ GetISO639LanguageName()

QString GetISO639LanguageName ( const QString &  iso639_1)

Definition at line 959 of file iso639.cpp.

Referenced by MythLocale::GetNativeLanguage().

◆ GetISO639EnglishLanguageName()

QString GetISO639EnglishLanguageName ( const QString &  iso639_1)

Definition at line 967 of file iso639.cpp.

Referenced by MythLocale::GetLanguage(), and LanguageSelection::Load().

Variable Documentation

◆ _iso639_key_to_english_name

QMap<int, QString> _iso639_key_to_english_name

◆ _iso639_key2_to_key3

QMap<int, int> _iso639_key2_to_key3
static

Definition at line 13 of file iso639.cpp.

Referenced by iso639_Alpha2_toName(), and iso639_str2_to_str3().

◆ _iso639_key3_to_canonical_key3

QMap<int, int> _iso639_key3_to_canonical_key3
static

Definition at line 14 of file iso639.cpp.

Referenced by iso639_key_to_canonical_key().

◆ _languages

QStringList _languages
static

Definition at line 15 of file iso639.cpp.

Referenced by iso639_clear_language_list(), and iso639_get_language_list().

◆ _language_keys

vector<int> _language_keys
static

Definition at line 16 of file iso639.cpp.

Referenced by iso639_clear_language_list(), and iso639_get_language_key_list().

◆ dummy_createCodeToEnglishNamesMap

int dummy_createCodeToEnglishNamesMap
Initial value:
=
static int createCodeToEnglishNamesMap(QMap< int, QString > &names)
Generated from http://www.loc.gov/standards/iso639-2/ascii_8bits.html using awk script: cat ISO-639-2...
Definition: iso639.cpp:178
QMap< int, QString > _iso639_key_to_english_name
Definition: iso639.cpp:12

Definition at line 131 of file iso639.cpp.

◆ dummy_createCode2ToCode3Map

int dummy_createCode2ToCode3Map
Initial value:
=
static int createCode2ToCode3Map(QMap< int, int > &codemap)
Definition: iso639.cpp:662
static QMap< int, int > _iso639_key2_to_key3
Definition: iso639.cpp:13

Definition at line 134 of file iso639.cpp.

◆ dummy_createCodeToCanonicalCodeMap

int dummy_createCodeToCanonicalCodeMap
Initial value:
=
static int createCodeToCanonicalCodeMap(QMap< int, int > &canonical)
Definition: iso639.cpp:140
static QMap< int, int > _iso639_key3_to_canonical_key3
Definition: iso639.cpp:14

Definition at line 137 of file iso639.cpp.

◆ gLanguageMap

ISO639ToNameMap gLanguageMap
static

Definition at line 957 of file iso639.cpp.

Referenced by GetISO639LanguageName().