MythTV
master
|
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. More... | |
MBASE_PUBLIC QString | iso639_key_toName (int iso639_2) |
Converts a canonical key to language name in English. More... | |
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. More... | |
MBASE_PUBLIC std::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'. More... | |
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 (const QString &iso639Code) |
MBASE_PUBLIC QString | GetISO639EnglishLanguageName (const QString &iso639Code) |
Variables | |
MBASE_PUBLIC QMap< int, QString > | iso639_key_to_english_name |
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".
Definition in file iso639.h.
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 100 of file iso639.cpp.
MBASE_PUBLIC QString iso639_key_toName | ( | int | iso639_2 | ) |
Converts a canonical key to language name in English.
Definition at line 109 of file iso639.cpp.
Referenced by DecoderBase::AutoSelectTrack(), GetISO639EnglishLanguageName(), AvFormatDecoder::GetTrackDesc(), DecoderBase::GetTrackDesc(), MythDVDDecoder::PostProcessTracks(), AvFormatDecoder::ScanRawTextCaptions(), AvFormatDecoder::ScanStreams(), AvFormatDecoder::ScanTeletextCaptions(), ISO639LanguageDescriptor::toString(), and AvFormatDecoder::UpdateATSCCaptionTracks().
MBASE_PUBLIC void iso639_clear_language_list | ( | void | ) |
Definition at line 22 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.
Definition at line 33 of file iso639.cpp.
Referenced by EITScanner::EITScanner(), and iso639_get_language_key_list().
MBASE_PUBLIC std::vector<int> iso639_get_language_key_list | ( | void | ) |
Definition at line 56 of file iso639.cpp.
MBASE_PUBLIC int iso639_key_to_canonical_key | ( | int | iso639_2 | ) |
Definition at line 118 of file iso639.cpp.
Referenced by AvFormatDecoder::AutoSelectAudioTrack(), MultipleStringStructure::CanonicalLanguageKey(), CaptionServiceDescriptor::CanonicalLanguageKey(), SCTEComponentNameDescriptor::CanonicalLanguageKey(), NetworkTextTable::CanonicalLanguageKey(), ComponentDescriptor::CanonicalLanguageKey(), ISO639LanguageDescriptor::CanonicalLanguageKey(), DataBroadcastDescriptor::CanonicalLanguageKey(), ExtendedEventDescriptor::CanonicalLanguageKey(), ShortEventDescriptor::CanonicalLanguageKey(), SubtitlingDescriptor::CanonicalLanguageKey(), TeletextDescriptor::CanonicalLanguageKey(), PrivateUPCCablecomEpisodeTitleDescriptor::CanonicalLanguageKey(), get_canonical_lang(), MythBDBuffer::GetAudioLanguage(), MythBDBuffer::GetSubtitleLanguage(), iso639_Alpha3_toName(), iso639_str_to_canonoical_str(), and EITHelper::SetLanguagePreferences().
MBASE_PUBLIC QString iso639_str2_to_str3 | ( | const QString & | str2 | ) |
Definition at line 68 of file iso639.cpp.
Referenced by AvFormatDecoder::AutoSelectAudioTrack(), MythDVDBuffer::ConvertLangCode(), get_canonical_lang(), GetISO639EnglishLanguageName(), ISO639_fill_selections(), and iso639_get_language_list().
|
inlinestatic |
Definition at line 44 of file iso639.h.
Referenced by MultipleStringStructure::CanonicalLanguageString(), CaptionServiceDescriptor::CanonicalLanguageString(), SCTEComponentNameDescriptor::CanonicalLanguageString(), NetworkTextTable::CanonicalLanguageString(), ComponentDescriptor::CanonicalLanguageString(), ISO639LanguageDescriptor::CanonicalLanguageString(), DataBroadcastDescriptor::CanonicalLanguageString(), ExtendedEventDescriptor::CanonicalLanguageString(), ShortEventDescriptor::CanonicalLanguageString(), SubtitlingDescriptor::CanonicalLanguageString(), TeletextDescriptor::CanonicalLanguageString(), PrivateUPCCablecomEpisodeTitleDescriptor::CanonicalLanguageString(), MythBDBuffer::GetAudioLanguage(), MythBDBuffer::GetSubtitleLanguage(), ISO639_fill_selections(), iso639_str2_to_str3(), iso639_str_to_canonoical_str(), MultipleStringStructure::LanguageString(), CaptionServiceDescriptor::LanguageString(), SCTEComponentNameDescriptor::LanguageString(), NetworkTextTable::LanguageString(), ComponentDescriptor::LanguageString(), ISO639LanguageDescriptor::LanguageString(), DataBroadcastDescriptor::LanguageString(), SupplementaryAudioDescriptor::LanguageString(), MessageDescriptor::LanguageString(), TargetRegionNameDescriptor::LanguageString(), ExtendedEventDescriptor::LanguageString(), ShortEventDescriptor::LanguageString(), SubtitlingDescriptor::LanguageString(), TeletextDescriptor::LanguageString(), PrivateUPCCablecomEpisodeTitleDescriptor::LanguageString(), MythCCExtractorPlayer::Process608Captions(), MythCCExtractorPlayer::Process708Captions(), MythCCExtractorPlayer::ProcessDVBSubtitles(), and MythCCExtractorPlayer::ProcessTeletext().
|
inlinestatic |
Returns true if the key is 0, 0xFFFFFF, or 'und'.
Definition at line 53 of file iso639.h.
Referenced by AvFormatDecoder::GetCaptionLanguage(), MythCCExtractorPlayer::Process608Captions(), MythCCExtractorPlayer::ProcessDVBSubtitles(), and MythCCExtractorPlayer::ProcessTeletext().
|
inlinestatic |
Definition at line 59 of file iso639.h.
Referenced by AvFormatDecoder::AutoSelectAudioTrack(), MythDVDBuffer::ConvertLangCode(), createCode2ToCode3Map(), createCodeToCanonicalCodeMap(), createCodeToEnglishNamesMap(), get_canonical_lang(), MythBDDecoder::GetAudioLanguage(), MythDVDDecoder::GetAudioLanguage(), MythBDBuffer::GetAudioLanguage(), GetISO639EnglishLanguageName(), MythBDDecoder::GetSubtitleLanguage(), MythBDBuffer::GetSubtitleLanguage(), AvFormatDecoder::GetSubtitleLanguage(), AvFormatDecoder::GetTeletextLanguage(), iso639_Alpha3_toName(), iso639_str3_to_key(), iso639_str_to_canonoical_str(), MultipleStringStructure::LanguageKey(), CaptionServiceDescriptor::LanguageKey(), SCTEComponentNameDescriptor::LanguageKey(), NetworkTextTable::LanguageKey(), ComponentDescriptor::LanguageKey(), ISO639LanguageDescriptor::LanguageKey(), DataBroadcastDescriptor::LanguageKey(), SupplementaryAudioDescriptor::LanguageKey(), MessageDescriptor::LanguageKey(), TargetRegionNameDescriptor::LanguageKey(), ExtendedEventDescriptor::LanguageKey(), ShortEventDescriptor::LanguageKey(), SubtitlingDescriptor::LanguageKey(), TeletextDescriptor::LanguageKey(), PrivateUPCCablecomEpisodeTitleDescriptor::LanguageKey(), AvFormatDecoder::ScanRawTextCaptions(), EITHelper::SetLanguagePreferences(), and AvFormatDecoder::UpdateCaptionTracksFromStreams().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 79 of file iso639.h.
Referenced by createCode2ToCode3Map(), iso639_Alpha2_toName(), iso639_str2_to_key2(), and iso639_str2_to_str3().
|
inlinestatic |
|
inlinestatic |
MBASE_PUBLIC QString GetISO639LanguageName | ( | const QString & | iso639Code | ) |
Definition at line 954 of file iso639.cpp.
Referenced by MythLocale::GetNativeLanguage().
MBASE_PUBLIC QString GetISO639EnglishLanguageName | ( | const QString & | iso639Code | ) |
Definition at line 962 of file iso639.cpp.
Referenced by MythLocale::GetLanguage(), V2Config::GetLanguages(), and LanguageSelection::Load().
MBASE_PUBLIC QMap<int, QString> iso639_key_to_english_name |
Definition at line 10 of file iso639.cpp.
Referenced by iso639_Alpha2_toName(), iso639_Alpha3_toName(), ISO639_fill_selections(), and iso639_key_toName().