16#define I18N_DEFAULT_LOCALE "en_US"
17#define I18N_MAX_LOCALE_LEN 16
18#define I18N_MAX_LANGUAGES 256
49const 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)
85#define tr(s) I18nTranslate(s)
const char * LanguageCode
const char * I18nLocale(int Language)
Returns the locale code of the given Language (which is an index as returned by I18nCurrentLanguage()...
const cStringList * I18nLanguages(void)
Returns the list of available languages.
int I18nLanguageIndex(const char *Code)
Returns the index of the language with the given three letter language Code.
void I18nInitialize(const char *LocaleDir=NULL)
Detects all available locales and loads the language names and codes.
int I18nNumLanguagesWithLocale(void)
Returns the number of entries in the list returned by I18nLanguages() that actually have a locale.
int I18nCurrentLanguage(void)
Returns the index of the current language.
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 char * I18nNormalizeLanguageCode(const char *Code)
Returns a 3 letter language code that may not be zero terminated.
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
void I18nRegister(const char *Plugin)
Registers the named plugin, so that it can use internationalized texts.
void I18nSetLanguage(int Language)
Sets the current language index to Language.
const char * I18nLanguageCode(int Language)
Returns the three letter language code of the given Language (which is an index as returned by I18nCu...