iso639.h File Reference

ISO 639-1 and ISO 639-2 support functions. More...

Go to the source code of this file.

Functions

MBASE_PUBLIC QString iso639_str_toName (const unsigned char *iso639)
 Converts a 2 or 3 character iso639 string to a language name in English.
MBASE_PUBLIC QString iso639_key_toName (int iso639_2)
 Converts a canonical key to language name in English.
MBASE_PUBLIC void iso639_clear_language_list (void)
MBASE_PUBLIC QStringList iso639_get_language_list (void)
 Returns list of three character ISO-639 language descriptors, starting with the most preferred.
MBASE_PUBLIC vector< int > iso639_get_language_key_list (void)
MBASE_PUBLIC int iso639_key_to_canonical_key (int iso639_2)
MBASE_PUBLIC QString iso639_str2_to_str3 (const QString &str2)
static QString iso639_key_to_str3 (int code)
static bool iso639_is_key_undefined (int code)
 Returns true if the key is 0, 0xFFFFFF, or 'und'.
static int iso639_str3_to_key (const unsigned char *iso639_2)
static int iso639_str3_to_key (const char *iso639_2)
static int iso639_str3_to_key (const QString &iso639_2)
static int iso639_str2_to_key2 (const unsigned char *iso639_1)
static int iso639_str2_to_key2 (const char *iso639_1)
static QString iso639_str_to_canonoical_str (const QString &str3)
MBASE_PUBLIC QString GetISO639LanguageName (QString iso639Code)
MBASE_PUBLIC QString GetISO639EnglishLanguageName (QString iso639Code)

Variables

MBASE_PUBLIC QMap< int, QString > _iso639_key_to_english_name

Detailed Description

ISO 639-1 and ISO 639-2 support functions.

ISO 639-1 is the two letter standard for specifying a language. This is used by MythTV for naming the themes and for initializing the Qt translation system.

ISO 639-2 is the three letter standard for specifying a language. This is used by MythTV for selecting subtitles and audio streams during playback, and for selecting which languages to collect EIT program guide information in.

In many contexts, such as with translations, these language codes can be appended with an underscore and a 2 digit IETF region code. So for Brazilian Portugese you could use: "por_BR", or "pt_BR". Or, you could specify just the language, Portugese: "por", or "pt".

See also:
iso639.h

Definition in file iso639.h.


Function Documentation

MBASE_PUBLIC 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 97 of file iso639.cpp.

MBASE_PUBLIC QString iso639_key_toName ( int  iso639_2  ) 
MBASE_PUBLIC void iso639_clear_language_list ( void   ) 

Definition at line 19 of file iso639.cpp.

MBASE_PUBLIC 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 30 of file iso639.cpp.

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

MBASE_PUBLIC vector<int> iso639_get_language_key_list ( void   ) 

Definition at line 53 of file iso639.cpp.

MBASE_PUBLIC int iso639_key_to_canonical_key ( int  iso639_2  ) 
MBASE_PUBLIC QString iso639_str2_to_str3 ( const QString &  str2  ) 
static QString iso639_key_to_str3 ( int  code  )  [inline, static]
static bool iso639_is_key_undefined ( int  code  )  [inline, static]

Returns true if the key is 0, 0xFFFFFF, or 'und'.

Definition at line 57 of file iso639.h.

Referenced by AvFormatDecoder::GetCaptionLanguage(), MythCCExtractorPlayer::Process608Captions(), and MythCCExtractorPlayer::Process708Captions().

static int iso639_str3_to_key ( const unsigned char *  iso639_2  )  [inline, static]
static int iso639_str3_to_key ( const char *  iso639_2  )  [inline, static]

Definition at line 68 of file iso639.h.

static int iso639_str3_to_key ( const QString &  iso639_2  )  [inline, static]

Definition at line 73 of file iso639.h.

static int iso639_str2_to_key2 ( const unsigned char *  iso639_1  )  [inline, static]
static int iso639_str2_to_key2 ( const char *  iso639_1  )  [inline, static]

Definition at line 93 of file iso639.h.

static QString iso639_str_to_canonoical_str ( const QString &  str3  )  [inline, static]

Definition at line 98 of file iso639.h.

MBASE_PUBLIC QString GetISO639LanguageName ( QString  iso639Code  ) 

Definition at line 954 of file iso639.cpp.

Referenced by MythLocale::GetNativeLanguage().

MBASE_PUBLIC QString GetISO639EnglishLanguageName ( QString  iso639Code  ) 

Definition at line 962 of file iso639.cpp.

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


Variable Documentation

MBASE_PUBLIC QMap<int, QString> _iso639_key_to_english_name
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:41:48 2012 for MythTV by  doxygen 1.6.3