ultimatepp/uppsrc/Core/i18n.h
cxl a6d2838c5f Report: Printing hints (thanks deep)
git-svn-id: svn://ultimatepp.org/upp/trunk@5935 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2013-03-30 10:31:22 +00:00

57 lines
1.2 KiB
C

struct LngEntry__ {
int lang;
const char *text;
};
void AddModule(const LngEntry__ *entry, const char *modulename = NULL);
const char *t_GetLngString(const char *id); // Only works with string literals because of caching !
#define LNG_enUS LNG_('E','N','U','S')
const char *GetENUS(const char *id);
// t_ and tt_ would cause translation files sync to report error, therefore it
// has to be included from file that is not part of package...
#include "t_.h"
/* t_.h:
#ifdef t_
#undef t_
#endif
#ifdef tt_
#undef tt_
#endif
#define t_(x) t_GetLngString(x)
#define tt_(x) x
*/
/* lt_.h:
#ifdef t_
#undef t_
#endif
#ifdef tt_
#undef tt_
#endif
#define t_(x) x
#define tt_(x) x
*/
String GetLngString(const char *id); // Only works with string literals because of caching !
String GetLngString(int lang, const char *id);
Index<int> GetLngSet();
Index<int> GetLngSet(const String& module);
void SaveLngFile(FileOut& out, int lang, int lang2 = 0);
bool LoadLngFile(const char *file);
void SetCurrentLanguage(int lang);
int GetCurrentLanguage();
void LngSetAdd(const char *id, int lang, const char *txt, bool addid);