X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06c545a70377ea25f2263b2d2fa432db67d8b619..cfcc3671aee71eb6849c5687500ab26e65943b68:/include/wx/intl.h?ds=inline diff --git a/include/wx/intl.h b/include/wx/intl.h index e18303f019..aec71543fb 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -19,6 +19,8 @@ #include "wx/defs.h" #include "wx/string.h" +#if wxUSE_INTL + // ============================================================================ // global decls // ============================================================================ @@ -30,9 +32,13 @@ // 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 // ---------------------------------------------------------------------------- @@ -137,5 +143,15 @@ inline const wxMB2WXbuf wxGetTranslation(const wxChar *sz) 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__