#include "wx/defs.h"
#include "wx/string.h"
+#if wxUSE_INTL
+
// ============================================================================
// global decls
// ============================================================================
// gettext() style macro (notice that xgettext should be invoked with "-k_"
// option to extract the strings inside _() from the sources)
#ifndef WXINTL_NO_GETTEXT_MACRO
- #define _(str) wxGetTranslation(_T(str))
+ #define _(str) wxGetTranslation(wxT(str))
#endif
+// another one which just marks the strings for extraction, but doesn't
+// perform the translation (use -kwxTRANSLATE with xgettext!)
+#define wxTRANSLATE(str) wxT(str)
+
// ----------------------------------------------------------------------------
// forward decls
// ----------------------------------------------------------------------------
inline const wxMB2WXbuf wxGetTranslation(const wxChar *sz)
{
wxLocale *pLoc = wxGetLocale();
- return pLoc ? pLoc->GetString(sz) : (const wxMB2WXbuf)sz;
+ if (pLoc)
+ return pLoc->GetString(sz);
+ else
+ return (const wxMB2WXbuf)sz;
}
+#else // !wxUSE_INTL
+
+#ifndef WXINTL_NO_GETTEXT_MACRO
+ #define _(str) (str)
+#endif
+
+inline const wxChar *wxGetTranslation(const wxChar *sz) { return sz; }
+
+#endif // wxUSE_INTL/!wxUSE_INTL
+
#endif
// _WX_INTLH__