/******************************************************************************
 *                                                                            *
 *                       (c) 2007-2026 Jaroslav fojtik                        *
 *                  This code could be used under LGPL licence                *
 *                                                                            *
 ******************************************************************************/
/** @file
 *  Translating and localisation C++ code including widgets.
 * Compiler: Borland C++ Builder 4 and 6
 *
 * Note: this cannot be compiled with Code GUARD in BCC6.
*/
#ifndef LOCALE_SET_H
#define LOCALE_SET_H

/* global functions and variables of gettext.cc */
#define EnvLanguage "LANGUAGE="

#define UTF8		16384

#ifdef __gettext__

#ifdef __cplusplus
extern "C" {
#endif
 extern const char *Empty2Info;
 extern short CodePage;

 void FixEnv(void);
 void TranslateStrings(TForm *Frm);
 void DumpStrings(int FormCount, const TForm *Frm, ...);
 void InitGettext(const char *GtxtDomain);
 void CheckGettext(const char *PROG_NAME, const char *GtxtDomain);
 //char *gettext__ (const char *__msgid);

#ifdef __cplusplus
 }
 AnsiString FixUTF8(const char *str);
 WideString FixUTF8W(const char *str);
 extern AnsiString (*TranslateX)(const char *str);
#endif

 #ifndef N_
  #define N_(EnString) EnString
 #endif

 #ifndef _
  #define _(EnString) gettext(EnString)
 #else
  //#undef _
  //#define _(EnString) gettext(EnString)
 #endif

#define bindtextdomain bindtextdomain__
#define textdomain textdomain__
#define dcgettext dcgettext__

#else	/* __gettext__ */
 #define _(arg) (arg)
 #define N_(EnString) EnString
 #define TranslateX(arg) (arg)
 #define FixUTF8(arg) (arg)
 #ifdef __cplusplus
  WideString FixUTF8W(const char *str);
 #endif
#endif


#endif //LOCALE_SET_H