summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-25 15:32:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-25 15:32:08 +0100
commit958c84f00a4be02c31eb2a1eec08e7fa68210f69 (patch)
tree945e35b5301fb448ec52724ac6c5ef29093711d4 /i18n.c
parentda7edf6e97031d983db5632b4428fa8bd7645ff7 (diff)
downloadvdr-958c84f00a4be02c31eb2a1eec08e7fa68210f69.tar.gz
vdr-958c84f00a4be02c31eb2a1eec08e7fa68210f69.tar.bz2
Implemented 32 audio and Dolby PIDs; storing audio language in channels.conf
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/i18n.c b/i18n.c
index 6a5060ff..f87827b6 100644
--- a/i18n.c
+++ b/i18n.c
@@ -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++) {