Implemented 32 audio and Dolby PIDs; storing audio language in channels.conf

This commit is contained in:
Klaus Schmidinger
2004-01-25 15:32:08 +01:00
parent da7edf6e97
commit 958c84f00a
9 changed files with 198 additions and 95 deletions

12
i18n.c
View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.145 2004/01/24 14:58:08 kls Exp $
* $Id: i18n.c 1.146 2004/01/25 14:41:02 kls Exp $
*
* Translations provided by:
*
@@ -4233,9 +4233,9 @@ const char * const * I18nCharSets(void)
return &Phrases[1][0];
}
const char * I18nLanguageAbbreviation(int Index)
const char * I18nLanguageCode(int Index)
{
return Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
return 0 <= Index && Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
}
int I18nLanguageIndex(const char *Code)
@@ -4248,6 +4248,12 @@ int I18nLanguageIndex(const char *Code)
return -1;
}
const char *I18nNormalizeLanguageCode(const char *Code)
{
int n = I18nLanguageIndex(Code);
return n >= 0 ? I18nLanguageCode(n) : Code;
}
bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference)
{
for (int i = 0; i < I18nNumLanguages; i++) {