added gettext plural forms support (patch #785660 with modifications)
[wxWidgets.git] / include / wx / intl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/intl.h
3 // Purpose: Internationalization and localisation for wxWindows
4 // Author: Vadim Zeitlin
5 // Modified by: Michael N. Filippov <michael@idisys.iae.nsk.su>
6 // (2003/09/30 - plural forms support)
7 // Created: 29/01/98
8 // RCS-ID: $Id$
9 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_INTL_H_
14 #define _WX_INTL_H_
15
16 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
17 #pragma interface "intl.h"
18 #endif
19
20 #include "wx/defs.h"
21 #include "wx/string.h"
22
23 #if wxUSE_INTL
24
25 #include "wx/fontenc.h"
26
27 // ============================================================================
28 // global decls
29 // ============================================================================
30
31 // ----------------------------------------------------------------------------
32 // macros
33 // ----------------------------------------------------------------------------
34
35 // gettext() style macros (notice that xgettext should be invoked with
36 // --keyword="_" --keyword="_N:1,2" --keyword="N_" options
37 // to extract the strings from the sources)
38 #ifndef WXINTL_NO_GETTEXT_MACRO
39 #define _(s) wxGetTranslation(_T(s))
40 #define _N(s1, s2, n) wxGetTranslation(_T(s1), _T(s2), n)
41 #define N_(s) _T(s)
42 #endif
43
44 // another one which just marks the strings for extraction, but doesn't
45 // perform the translation (use -kwxTRANSLATE with xgettext!)
46 #define wxTRANSLATE(str) _T(str)
47
48 // ----------------------------------------------------------------------------
49 // forward decls
50 // ----------------------------------------------------------------------------
51
52 class WXDLLIMPEXP_BASE wxLocale;
53 class WXDLLIMPEXP_BASE wxMsgCatalog;
54 class WXDLLIMPEXP_BASE wxLanguageInfoArray;
55
56 // ============================================================================
57 // locale support
58 // ============================================================================
59
60 // ----------------------------------------------------------------------------
61 // wxLanguage: defines all supported languages
62 // ----------------------------------------------------------------------------
63
64 // --- --- --- generated code begins here --- --- ---
65
66 // This enum is generated by misc/languages/genlang.py
67 // When making changes, please put them into misc/languages/langtabl.txt
68 enum wxLanguage
69 {
70 // user's default/preffered language as got from OS:
71 wxLANGUAGE_DEFAULT,
72 // unknown language, if wxLocale::GetSystemLanguage fails:
73 wxLANGUAGE_UNKNOWN,
74
75 wxLANGUAGE_ABKHAZIAN,
76 wxLANGUAGE_AFAR,
77 wxLANGUAGE_AFRIKAANS,
78 wxLANGUAGE_ALBANIAN,
79 wxLANGUAGE_AMHARIC,
80 wxLANGUAGE_ARABIC,
81 wxLANGUAGE_ARABIC_ALGERIA,
82 wxLANGUAGE_ARABIC_BAHRAIN,
83 wxLANGUAGE_ARABIC_EGYPT,
84 wxLANGUAGE_ARABIC_IRAQ,
85 wxLANGUAGE_ARABIC_JORDAN,
86 wxLANGUAGE_ARABIC_KUWAIT,
87 wxLANGUAGE_ARABIC_LEBANON,
88 wxLANGUAGE_ARABIC_LIBYA,
89 wxLANGUAGE_ARABIC_MOROCCO,
90 wxLANGUAGE_ARABIC_OMAN,
91 wxLANGUAGE_ARABIC_QATAR,
92 wxLANGUAGE_ARABIC_SAUDI_ARABIA,
93 wxLANGUAGE_ARABIC_SUDAN,
94 wxLANGUAGE_ARABIC_SYRIA,
95 wxLANGUAGE_ARABIC_TUNISIA,
96 wxLANGUAGE_ARABIC_UAE,
97 wxLANGUAGE_ARABIC_YEMEN,
98 wxLANGUAGE_ARMENIAN,
99 wxLANGUAGE_ASSAMESE,
100 wxLANGUAGE_AYMARA,
101 wxLANGUAGE_AZERI,
102 wxLANGUAGE_AZERI_CYRILLIC,
103 wxLANGUAGE_AZERI_LATIN,
104 wxLANGUAGE_BASHKIR,
105 wxLANGUAGE_BASQUE,
106 wxLANGUAGE_BELARUSIAN,
107 wxLANGUAGE_BENGALI,
108 wxLANGUAGE_BHUTANI,
109 wxLANGUAGE_BIHARI,
110 wxLANGUAGE_BISLAMA,
111 wxLANGUAGE_BRETON,
112 wxLANGUAGE_BULGARIAN,
113 wxLANGUAGE_BURMESE,
114 wxLANGUAGE_CAMBODIAN,
115 wxLANGUAGE_CATALAN,
116 wxLANGUAGE_CHINESE,
117 wxLANGUAGE_CHINESE_SIMPLIFIED,
118 wxLANGUAGE_CHINESE_TRADITIONAL,
119 wxLANGUAGE_CHINESE_HONGKONG,
120 wxLANGUAGE_CHINESE_MACAU,
121 wxLANGUAGE_CHINESE_SINGAPORE,
122 wxLANGUAGE_CHINESE_TAIWAN,
123 wxLANGUAGE_CORSICAN,
124 wxLANGUAGE_CROATIAN,
125 wxLANGUAGE_CZECH,
126 wxLANGUAGE_DANISH,
127 wxLANGUAGE_DUTCH,
128 wxLANGUAGE_DUTCH_BELGIAN,
129 wxLANGUAGE_ENGLISH,
130 wxLANGUAGE_ENGLISH_UK,
131 wxLANGUAGE_ENGLISH_US,
132 wxLANGUAGE_ENGLISH_AUSTRALIA,
133 wxLANGUAGE_ENGLISH_BELIZE,
134 wxLANGUAGE_ENGLISH_BOTSWANA,
135 wxLANGUAGE_ENGLISH_CANADA,
136 wxLANGUAGE_ENGLISH_CARIBBEAN,
137 wxLANGUAGE_ENGLISH_DENMARK,
138 wxLANGUAGE_ENGLISH_EIRE,
139 wxLANGUAGE_ENGLISH_JAMAICA,
140 wxLANGUAGE_ENGLISH_NEW_ZEALAND,
141 wxLANGUAGE_ENGLISH_PHILIPPINES,
142 wxLANGUAGE_ENGLISH_SOUTH_AFRICA,
143 wxLANGUAGE_ENGLISH_TRINIDAD,
144 wxLANGUAGE_ENGLISH_ZIMBABWE,
145 wxLANGUAGE_ESPERANTO,
146 wxLANGUAGE_ESTONIAN,
147 wxLANGUAGE_FAEROESE,
148 wxLANGUAGE_FARSI,
149 wxLANGUAGE_FIJI,
150 wxLANGUAGE_FINNISH,
151 wxLANGUAGE_FRENCH,
152 wxLANGUAGE_FRENCH_BELGIAN,
153 wxLANGUAGE_FRENCH_CANADIAN,
154 wxLANGUAGE_FRENCH_LUXEMBOURG,
155 wxLANGUAGE_FRENCH_MONACO,
156 wxLANGUAGE_FRENCH_SWISS,
157 wxLANGUAGE_FRISIAN,
158 wxLANGUAGE_GALICIAN,
159 wxLANGUAGE_GEORGIAN,
160 wxLANGUAGE_GERMAN,
161 wxLANGUAGE_GERMAN_AUSTRIAN,
162 wxLANGUAGE_GERMAN_BELGIUM,
163 wxLANGUAGE_GERMAN_LIECHTENSTEIN,
164 wxLANGUAGE_GERMAN_LUXEMBOURG,
165 wxLANGUAGE_GERMAN_SWISS,
166 wxLANGUAGE_GREEK,
167 wxLANGUAGE_GREENLANDIC,
168 wxLANGUAGE_GUARANI,
169 wxLANGUAGE_GUJARATI,
170 wxLANGUAGE_HAUSA,
171 wxLANGUAGE_HEBREW,
172 wxLANGUAGE_HINDI,
173 wxLANGUAGE_HUNGARIAN,
174 wxLANGUAGE_ICELANDIC,
175 wxLANGUAGE_INDONESIAN,
176 wxLANGUAGE_INTERLINGUA,
177 wxLANGUAGE_INTERLINGUE,
178 wxLANGUAGE_INUKTITUT,
179 wxLANGUAGE_INUPIAK,
180 wxLANGUAGE_IRISH,
181 wxLANGUAGE_ITALIAN,
182 wxLANGUAGE_ITALIAN_SWISS,
183 wxLANGUAGE_JAPANESE,
184 wxLANGUAGE_JAVANESE,
185 wxLANGUAGE_KANNADA,
186 wxLANGUAGE_KASHMIRI,
187 wxLANGUAGE_KASHMIRI_INDIA,
188 wxLANGUAGE_KAZAKH,
189 wxLANGUAGE_KERNEWEK,
190 wxLANGUAGE_KINYARWANDA,
191 wxLANGUAGE_KIRGHIZ,
192 wxLANGUAGE_KIRUNDI,
193 wxLANGUAGE_KONKANI,
194 wxLANGUAGE_KOREAN,
195 wxLANGUAGE_KURDISH,
196 wxLANGUAGE_LAOTHIAN,
197 wxLANGUAGE_LATIN,
198 wxLANGUAGE_LATVIAN,
199 wxLANGUAGE_LINGALA,
200 wxLANGUAGE_LITHUANIAN,
201 wxLANGUAGE_MACEDONIAN,
202 wxLANGUAGE_MALAGASY,
203 wxLANGUAGE_MALAY,
204 wxLANGUAGE_MALAYALAM,
205 wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM,
206 wxLANGUAGE_MALAY_MALAYSIA,
207 wxLANGUAGE_MALTESE,
208 wxLANGUAGE_MANIPURI,
209 wxLANGUAGE_MAORI,
210 wxLANGUAGE_MARATHI,
211 wxLANGUAGE_MOLDAVIAN,
212 wxLANGUAGE_MONGOLIAN,
213 wxLANGUAGE_NAURU,
214 wxLANGUAGE_NEPALI,
215 wxLANGUAGE_NEPALI_INDIA,
216 wxLANGUAGE_NORWEGIAN_BOKMAL,
217 wxLANGUAGE_NORWEGIAN_NYNORSK,
218 wxLANGUAGE_OCCITAN,
219 wxLANGUAGE_ORIYA,
220 wxLANGUAGE_OROMO,
221 wxLANGUAGE_PASHTO,
222 wxLANGUAGE_POLISH,
223 wxLANGUAGE_PORTUGUESE,
224 wxLANGUAGE_PORTUGUESE_BRAZILIAN,
225 wxLANGUAGE_PUNJABI,
226 wxLANGUAGE_QUECHUA,
227 wxLANGUAGE_RHAETO_ROMANCE,
228 wxLANGUAGE_ROMANIAN,
229 wxLANGUAGE_RUSSIAN,
230 wxLANGUAGE_RUSSIAN_UKRAINE,
231 wxLANGUAGE_SAMOAN,
232 wxLANGUAGE_SANGHO,
233 wxLANGUAGE_SANSKRIT,
234 wxLANGUAGE_SCOTS_GAELIC,
235 wxLANGUAGE_SERBIAN,
236 wxLANGUAGE_SERBIAN_CYRILLIC,
237 wxLANGUAGE_SERBIAN_LATIN,
238 wxLANGUAGE_SERBO_CROATIAN,
239 wxLANGUAGE_SESOTHO,
240 wxLANGUAGE_SETSWANA,
241 wxLANGUAGE_SHONA,
242 wxLANGUAGE_SINDHI,
243 wxLANGUAGE_SINHALESE,
244 wxLANGUAGE_SISWATI,
245 wxLANGUAGE_SLOVAK,
246 wxLANGUAGE_SLOVENIAN,
247 wxLANGUAGE_SOMALI,
248 wxLANGUAGE_SPANISH,
249 wxLANGUAGE_SPANISH_ARGENTINA,
250 wxLANGUAGE_SPANISH_BOLIVIA,
251 wxLANGUAGE_SPANISH_CHILE,
252 wxLANGUAGE_SPANISH_COLOMBIA,
253 wxLANGUAGE_SPANISH_COSTA_RICA,
254 wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC,
255 wxLANGUAGE_SPANISH_ECUADOR,
256 wxLANGUAGE_SPANISH_EL_SALVADOR,
257 wxLANGUAGE_SPANISH_GUATEMALA,
258 wxLANGUAGE_SPANISH_HONDURAS,
259 wxLANGUAGE_SPANISH_MEXICAN,
260 wxLANGUAGE_SPANISH_MODERN,
261 wxLANGUAGE_SPANISH_NICARAGUA,
262 wxLANGUAGE_SPANISH_PANAMA,
263 wxLANGUAGE_SPANISH_PARAGUAY,
264 wxLANGUAGE_SPANISH_PERU,
265 wxLANGUAGE_SPANISH_PUERTO_RICO,
266 wxLANGUAGE_SPANISH_URUGUAY,
267 wxLANGUAGE_SPANISH_US,
268 wxLANGUAGE_SPANISH_VENEZUELA,
269 wxLANGUAGE_SUNDANESE,
270 wxLANGUAGE_SWAHILI,
271 wxLANGUAGE_SWEDISH,
272 wxLANGUAGE_SWEDISH_FINLAND,
273 wxLANGUAGE_TAGALOG,
274 wxLANGUAGE_TAJIK,
275 wxLANGUAGE_TAMIL,
276 wxLANGUAGE_TATAR,
277 wxLANGUAGE_TELUGU,
278 wxLANGUAGE_THAI,
279 wxLANGUAGE_TIBETAN,
280 wxLANGUAGE_TIGRINYA,
281 wxLANGUAGE_TONGA,
282 wxLANGUAGE_TSONGA,
283 wxLANGUAGE_TURKISH,
284 wxLANGUAGE_TURKMEN,
285 wxLANGUAGE_TWI,
286 wxLANGUAGE_UIGHUR,
287 wxLANGUAGE_UKRAINIAN,
288 wxLANGUAGE_URDU,
289 wxLANGUAGE_URDU_INDIA,
290 wxLANGUAGE_URDU_PAKISTAN,
291 wxLANGUAGE_UZBEK,
292 wxLANGUAGE_UZBEK_CYRILLIC,
293 wxLANGUAGE_UZBEK_LATIN,
294 wxLANGUAGE_VIETNAMESE,
295 wxLANGUAGE_VOLAPUK,
296 wxLANGUAGE_WELSH,
297 wxLANGUAGE_WOLOF,
298 wxLANGUAGE_XHOSA,
299 wxLANGUAGE_YIDDISH,
300 wxLANGUAGE_YORUBA,
301 wxLANGUAGE_ZHUANG,
302 wxLANGUAGE_ZULU,
303
304 // for custom, user-defined languages:
305 wxLANGUAGE_USER_DEFINED
306 };
307
308 // --- --- --- generated code ends here --- --- ---
309
310 // ----------------------------------------------------------------------------
311 // wxLanguageInfo: encapsulates wxLanguage to OS native lang.desc.
312 // translation information
313 // ----------------------------------------------------------------------------
314
315 struct WXDLLIMPEXP_BASE wxLanguageInfo
316 {
317 int Language; // wxLanguage id
318 wxString CanonicalName; // Canonical name, e.g. fr_FR
319 #ifdef __WIN32__
320 wxUint32 WinLang, // Win32 language identifiers
321 WinSublang;
322 #endif // __WIN32__
323 wxString Description; // human-readable name of the language
324 };
325
326 // ----------------------------------------------------------------------------
327 // wxLocaleCategory: the category of locale settings
328 // ----------------------------------------------------------------------------
329
330 enum wxLocaleCategory
331 {
332 // (any) numbers
333 wxLOCALE_CAT_NUMBER,
334
335 // date/time
336 wxLOCALE_CAT_DATE,
337
338 // monetary value
339 wxLOCALE_CAT_MONEY,
340
341 wxLOCALE_CAT_MAX
342 };
343
344 // ----------------------------------------------------------------------------
345 // wxLocaleInfo: the items understood by wxLocale::GetInfo()
346 // ----------------------------------------------------------------------------
347
348 enum wxLocaleInfo
349 {
350 // the thounsands separator
351 wxLOCALE_THOUSANDS_SEP,
352
353 // the character used as decimal point
354 wxLOCALE_DECIMAL_POINT
355
356 };
357
358 // ----------------------------------------------------------------------------
359 // wxLocale: encapsulates all language dependent settings, including current
360 // message catalogs, date, time and currency formats (TODO) &c
361 // ----------------------------------------------------------------------------
362
363 enum wxLocaleInitFlags
364 {
365 wxLOCALE_LOAD_DEFAULT = 0x0001, // load wxwin.mo?
366 wxLOCALE_CONV_ENCODING = 0x0002 // convert encoding on the fly?
367 };
368
369 class WXDLLIMPEXP_BASE wxLocale
370 {
371 public:
372 // ctor & dtor
373 // -----------
374
375 // call Init() if you use this ctor
376 wxLocale();
377 // the ctor has a side effect of changing current locale
378 wxLocale(const wxChar *szName, // name (for messages)
379 const wxChar *szShort = (const wxChar *) NULL, // dir prefix (for msg files)
380 const wxChar *szLocale = (const wxChar *) NULL, // locale (for setlocale)
381 bool bLoadDefault = TRUE, // preload wxstd.mo?
382 bool bConvertEncoding = FALSE) // convert Win<->Unix if neccessary?
383 {
384 Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding);
385 }
386
387 wxLocale(int language, // wxLanguage id or custom language
388 int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING)
389 { Init(language, flags); }
390
391 // the same as a function (returns TRUE on success)
392 bool Init(const wxChar *szName,
393 const wxChar *szShort = (const wxChar *) NULL,
394 const wxChar *szLocale = (const wxChar *) NULL,
395 bool bLoadDefault = TRUE,
396 bool bConvertEncoding = FALSE);
397
398 // same as second ctor (returns TRUE on success)
399 bool Init(int language = wxLANGUAGE_DEFAULT,
400 int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
401
402 // restores old locale
403 ~wxLocale();
404
405 // Try to get user's (or OS's) prefered language setting.
406 // Return wxLANGUAGE_UNKNOWN if language-guessing algorithm failed
407 static int GetSystemLanguage();
408
409 // get the encoding used by default for text on this system, returns
410 // wxFONTENCODING_SYSTEM if it couldn't be determined
411 static wxFontEncoding GetSystemEncoding();
412
413 // get the string describing the system encoding, return empty string if
414 // couldn't be determined
415 static wxString GetSystemEncodingName();
416
417 // get the values of the given locale-dependent datum: the current locale
418 // is used, the US default value is returned if everything else fails
419 static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat);
420
421 // return TRUE if the locale was set successfully
422 bool IsOk() const { return m_pszOldLocale != NULL; }
423
424 // returns locale name
425 const wxChar *GetLocale() const { return m_strLocale; }
426
427 // return current locale wxLanguage value
428 int GetLanguage() const { return m_language; }
429
430 // return locale name to be passed to setlocale()
431 wxString GetSysName() const;
432
433 // return 'canonical' name, i.e. in the form of xx[_YY], where xx is
434 // language code according to ISO 639 and YY is country name
435 // as specified by ISO 3166.
436 wxString GetCanonicalName() const { return m_strShort; }
437
438 // add a prefix to the catalog lookup path: the message catalog files will be
439 // looked up under prefix/<lang>/LC_MESSAGES, prefix/LC_MESSAGES and prefix
440 // (in this order).
441 //
442 // This only applies to subsequent invocations of AddCatalog()!
443 static void AddCatalogLookupPathPrefix(const wxString& prefix);
444
445 // add a catalog: it's searched for in standard places (current directory
446 // first, system one after), but the you may prepend additional directories to
447 // the search path with AddCatalogLookupPathPrefix().
448 //
449 // The loaded catalog will be used for message lookup by GetString().
450 //
451 // Returns 'true' if it was successfully loaded
452 bool AddCatalog(const wxChar *szDomain);
453
454 // check if the given catalog is loaded
455 bool IsLoaded(const wxChar *szDomain) const;
456
457 // Retrieve the language info struct for the given language
458 //
459 // Returns NULL if no info found, pointer must *not* be deleted by caller
460 static const wxLanguageInfo *GetLanguageInfo(int lang);
461
462 // Returns language name in English or empty string if the language
463 // is not in database
464 static wxString GetLanguageName(int lang);
465
466 // Find the language for the given locale string which may be either a
467 // canonical ISO 2 letter language code ("xx"), a language code followed by
468 // the country code ("xx_XX") or a Windows full language name ("Xxxxx...")
469 //
470 // Returns NULL if no info found, pointer must *not* be deleted by caller
471 static const wxLanguageInfo *FindLanguageInfo(const wxString& locale);
472
473 // Add custom language to the list of known languages.
474 // Notes: 1) wxLanguageInfo contains platform-specific data
475 // 2) must be called before Init to have effect
476 static void AddLanguage(const wxLanguageInfo& info);
477
478 // retrieve the translation for a string in all loaded domains unless
479 // the szDomain parameter is specified (and then only this domain is
480 // searched)
481 // n - additional parameter for PluralFormsParser
482 //
483 // return original string if translation is not available
484 // (in this case an error message is generated the first time
485 // a string is not found; use wxLogNull to suppress it)
486 //
487 // domains are searched in the last to first order, i.e. catalogs
488 // added later override those added before.
489 const wxChar *GetString(const wxChar *szOrigString,
490 const wxChar *szDomain = (const wxChar *) NULL) const;
491 // plural form version of the same:
492 const wxChar *GetString(const wxChar *szOrigString,
493 const wxChar *szOrigString2,
494 size_t n,
495 const wxChar *szDomain = (const wxChar *) NULL) const;
496
497 // Returns the current short name for the locale
498 const wxString& GetName() const { return m_strShort; }
499
500 // These two methods are for internal use only. First one creates
501 // ms_languagesDB if it doesn't already exist, second one destroys
502 // it.
503 static void CreateLanguagesDB();
504 static void DestroyLanguagesDB();
505
506 private:
507 // find catalog by name in a linked list, return NULL if !found
508 wxMsgCatalog *FindCatalog(const wxChar *szDomain) const;
509
510 // copy default table of languages from global static array to
511 // m_langugagesInfo, called by InitLanguagesDB
512 static void InitLanguagesDB();
513
514 wxString m_strLocale, // this locale name
515 m_strShort; // short name for the locale
516 int m_language; // this locale wxLanguage value
517
518 const wxChar *m_pszOldLocale; // previous locale from setlocale()
519 wxLocale *m_pOldLocale; // previous wxLocale
520
521 wxMsgCatalog *m_pMsgCat; // pointer to linked list of catalogs
522
523 bool m_bConvertEncoding;
524
525 static wxLanguageInfoArray *ms_languagesDB;
526
527 DECLARE_NO_COPY_CLASS(wxLocale)
528 };
529
530 // ----------------------------------------------------------------------------
531 // global functions
532 // ----------------------------------------------------------------------------
533
534 // get the current locale object (note that it may be NULL!)
535 extern WXDLLIMPEXP_BASE wxLocale* wxGetLocale();
536
537 // get the translation of the string in the current locale
538 inline const wxChar *wxGetTranslation(const wxChar *sz)
539 {
540 wxLocale *pLoc = wxGetLocale();
541 if (pLoc)
542 return pLoc->GetString(sz);
543 else
544 return sz;
545 }
546 inline const wxChar *wxGetTranslation(const wxChar *sz1, const wxChar *sz2,
547 size_t n)
548 {
549 wxLocale *pLoc = wxGetLocale();
550 if (pLoc)
551 return pLoc->GetString(sz1, sz2, n);
552 else
553 return n == 1 ? sz1 : sz2;
554 }
555
556 #else // !wxUSE_INTL
557
558 // the macros should still be defined - otherwise compilation would fail
559
560 #if !defined(WXINTL_NO_GETTEXT_MACRO) && !defined(_)
561 #define _(s) (_T(s))
562 #define _N(s1, s2, n) ((n) == 1 ? _T(s1) : _T(s2))
563 #define N_(s) _T(s)
564 #endif
565
566 #define wxTRANSLATE(str) _T(str)
567
568 // Note: use of 'inline' here can cause this symbol not to be found when compiled with gcc
569 //const wxChar *wxGetTranslation(const wxChar *sz);
570 #define wxGetTranslation(sz) (sz)
571
572 #endif // wxUSE_INTL/!wxUSE_INTL
573
574 // define this one just in case it occurs somewhere (instead of preferred
575 // wxTRANSLATE) too
576 #if !defined(WXINTL_NO_GETTEXT_MACRO) && !defined(gettext_noop)
577 #define gettext_noop(str) _T(str)
578 #endif
579
580 #endif // _WX_INTL_H_
581