16 #define I18N_DEFAULT_LOCALE "en_US" 17 #define I18N_MAX_LOCALE_LEN 16 // for buffers that hold en_US etc. 18 #define I18N_MAX_LANGUAGES 256 // for buffers that hold all available languages 49 const char *
I18nTranslate(
const char *s,
const char *Plugin = NULL) __attribute_format_arg__(1);
81 #ifdef PLUGIN_NAME_I18N 82 #define tr(s) I18nTranslate(s, "vdr-" PLUGIN_NAME_I18N) 83 #define trVDR(s) I18nTranslate(s) // to use a text that's in the VDR core's translation file 85 #define tr(s) I18nTranslate(s) int I18nLanguageIndex(const char *Code)
Returns the index of the language with the given three letter language Code.
int I18nCurrentLanguage(void)
Returns the index of the current language.
const char * I18nNormalizeLanguageCode(const char *Code)
Returns a 3 letter language code that may not be zero terminated.
void I18nRegister(const char *Plugin)
Registers the named plugin, so that it can use internationalized texts.
const char * LanguageCode
void I18nInitialize(const char *LocaleDir=NULL)
Detects all available locales and loads the language names and codes.
const char * I18nLocale(int Language)
Returns the locale code of the given Language (which is an index as returned by I18nCurrentLanguage()...
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
const char * I18nLanguageCode(int Language)
Returns the three letter language code of the given Language (which is an index as returned by I18nCu...
bool I18nIsPreferredLanguage(int *PreferredLanguages, const char *LanguageCode, int &OldPreference, int *Position=NULL)
Checks the given LanguageCode (which may be something like "eng" or "eng+deu") against the PreferredL...
const char * I18nTranslate(const char *s, const char *Plugin=NULL) __attribute_format_arg__(1)
Translates the given string (with optional Plugin context) into the current language.
const cStringList * I18nLanguages(void)
Returns the list of available languages.
void I18nSetLanguage(int Language)
Sets the current language index to Language.
int I18nNumLanguagesWithLocale(void)
Returns the number of entries in the list returned by I18nLanguages() that actually have a locale...