]> git.vomp.tv Git - vompclient.git/blob - i18n.h
I18n
[vompclient.git] / i18n.h
1 /*\r
2  * i18n.h: Internationalization\r
3  *\r
4  * This code is taken from the VDR project and modified for VOMP.\r
5  * See the main source file 'vdr.c' for original copyright information.\r
6  * Modifications (C) 2005 D Pickles.\r
7 \r
8     This file is part of VOMP.\r
9 \r
10     VOMP is free software; you can redistribute it and/or modify\r
11     it under the terms of the GNU General Public License as published by\r
12     the Free Software Foundation; either version 2 of the License, or\r
13     (at your option) any later version.\r
14 \r
15     VOMP is distributed in the hope that it will be useful,\r
16     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
18     GNU General Public License for more details.\r
19 \r
20     You should have received a copy of the GNU General Public License\r
21     along with VOMP; if not, write to the Free Software\r
22     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
23  */\r
24 \r
25 #ifndef __I18N_H\r
26 #define __I18N_H\r
27 \r
28 #include <stdio.h>\r
29 \r
30 #define NUM_LANGUAGES 2\r
31 #define INITIAL_LANGUAGE "English"\r
32 #define INITIAL_LANGUAGE_INDEX 0\r
33 #define tr(s)  I18n::Translate(s)\r
34 \r
35 \r
36 typedef char *tI18nPhrase[NUM_LANGUAGES];\r
37 \r
38 \r
39 class I18n\r
40 {\r
41   public:\r
42     static char *Translate(char *s);\r
43     const char * const * CharSets(void);\r
44     const char * LanguageCode(int Index);\r
45     static int Initialize(void);\r
46 \r
47     static char * LanguageName(int Index);\r
48     static int LanguageIndex(const char *Name);\r
49     static int GetNumLanguages(void);\r
50 \r
51   private:\r
52 \r
53     const static int I18nNumLanguages = NUM_LANGUAGES;\r
54 };\r
55 \r
56 \r
57 #endif //__I18N_H\r
58 \r