SASC-NG
DVBSoftCAM

i18n.h

Go to the documentation of this file.
00001 /*
00002  * i18n.h: Internationalization
00003  *
00004  * See the main source file 'vdr.c' for copyright information and
00005  * how to reach the author.
00006  *
00007  * $Id: i18n.h 1.20 2007/05/28 11:43:14 kls Exp $
00008  */
00009 
00010 #ifndef __I18N_H
00011 #define __I18N_H
00012 
00013 #include <stdio.h>
00014 
00015 const int I18nNumLanguages = 22;
00016 
00017 typedef const char *tI18nPhrase[I18nNumLanguages];
00018 
00019 void I18nRegister(const tI18nPhrase * const Phrases, const char *Plugin);
00020 
00021 const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1);
00022 
00023 const char * const * I18nLanguages(void);
00024 const char *I18nLanguageCode(int Index);
00025 int I18nLanguageIndex(const char *Code);
00026 const char *I18nNormalizeLanguageCode(const char *Code);
00030 bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode, int &OldPreference, int *Position = NULL);
00040 
00041 #ifdef PLUGIN_NAME_I18N
00042 #define tr(s)  I18nTranslate(s, PLUGIN_NAME_I18N)
00043 #else
00044 #define tr(s)  I18nTranslate(s)
00045 #endif
00046 
00047 #define trNOOP(s) (s)
00048 
00049 #endif //__I18N_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines