summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c177
1 files changed, 176 insertions, 1 deletions
diff --git a/i18n.c b/i18n.c
index 6a35e5a..c72ccd8 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.137 2003/12/19 13:32:10 kls Exp $
+ * $Id: i18n.c 1.140 2004/01/11 15:38:45 kls Exp $
*
* Translations provided by:
*
@@ -111,6 +111,24 @@ const tI18nPhrase Phrases[] = {
"iso8859-1",
"iso8859-1",
},
+ // The 3-letter names of the language (this MUST be the third phrase!):
+ { "eng",
+ "deu,ger",
+ "slv",
+ "ita",
+ "dut,nla",
+ "por",
+ "fra,fre",
+ "nor",
+ "fin",
+ "pol",
+ "esl,spa",
+ "ell,gre",
+ "sve,swe",
+ "ron,rum",
+ "hun",
+ "cat,cln",
+ },
// Menu titles:
{ "VDR",
"VDR",
@@ -2227,6 +2245,40 @@ const tI18nPhrase Phrases[] = {
"Idöhöz tartozó Transponder",
"Usar el temps del múltiplex",
},
+ { "Setup.EPG$Preferred languages",
+ "Bevorzugte Sprachen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikielet",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "Setup.EPG$Preferred language",
+ "Bevorzugte Sprache",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "Suosikkikieli",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.DVB$Primary DVB interface",
"Primäres DVB Interface",
"Primarna naprava",
@@ -2261,6 +2313,91 @@ const tI18nPhrase Phrases[] = {
"Video formátum",
"Format del vídeo",
},
+ { "Setup.DVB$Update channels",
+ "Kanäle aktualisieren",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names only",
+ "nur Namen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "names and PIDs",
+ "Namen und PIDs",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new channels",
+ "neue Kanäle hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "add new transponders",
+ "neue Transponder hinzufügen",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.LNB$SLOF (MHz)",
"SLOF (MHz)",
"Frekvenca preklopa (MHz)",
@@ -3852,3 +3989,41 @@ const char * const * I18nCharSets(void)
{
return &Phrases[1][0];
}
+
+const char * I18nLanguageAbbreviation(int Index)
+{
+ return Index < I18nNumLanguages ? Phrases[2][Index] : NULL;
+}
+
+int I18nLanguageIndex(const char Code[3])
+{
+ char s[4];
+ memcpy(s, Code, 3);
+ s[3] = 0;
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (strcasestr(Phrases[2][i], s))
+ return i;
+ }
+ //dsyslog("unknown language code: '%s'", s);
+ return -1;
+}
+
+bool I18nIsPreferredLanguage(int *PreferredLanguages, int LanguageIndex, int &OldPreference)
+{
+ for (int i = 0; i < I18nNumLanguages; i++) {
+ if (PreferredLanguages[i] < 0)
+ break; // the language is not a preferred one
+ if (PreferredLanguages[i] == LanguageIndex) {
+ if (OldPreference < 0 || i < OldPreference) {
+ OldPreference = i;
+ return true;
+ }
+ break;
+ }
+ }
+ if (OldPreference < 0) {
+ OldPreference = I18nNumLanguages; // higher than the maximum possible value
+ return true; // if we don't find a preferred one, we take the first one
+ }
+ return false;
+}