]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/intl.h
document various enumerations defined in defs.h; give a name to the anonymous enum...
[wxWidgets.git] / include / wx / intl.h
index 127c2c15d5263afa1b7f0c961d51f5ca09aefd37..cead0308847621d817aa0e41c8769cde41cc56fe 100644 (file)
@@ -10,6 +10,9 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// WARNING: Parts of this file are generated. See misc/languages/README for
+// details.
+
 #ifndef _WX_INTL_H_
 #define _WX_INTL_H_
 
 #ifndef _WX_INTL_H_
 #define _WX_INTL_H_
 
@@ -42,13 +45,13 @@ enum wxLayoutDirection
 // --keyword="_" --keyword="wxPLURAL:1,2" options
 // to extract the strings from the sources)
 #ifndef WXINTL_NO_GETTEXT_MACRO
 // --keyword="_" --keyword="wxPLURAL:1,2" options
 // to extract the strings from the sources)
 #ifndef WXINTL_NO_GETTEXT_MACRO
-    #define _(s)                     wxGetTranslation(_T(s))
-    #define wxPLURAL(sing, plur, n)  wxGetTranslation(_T(sing), _T(plur), n)
+    #define _(s)                     wxGetTranslation((s))
+    #define wxPLURAL(sing, plur, n)  wxGetTranslation((sing), (plur), n)
 #endif
 
 // another one which just marks the strings for extraction, but doesn't
 // perform the translation (use -kwxTRANSLATE with xgettext!)
 #endif
 
 // another one which just marks the strings for extraction, but doesn't
 // perform the translation (use -kwxTRANSLATE with xgettext!)
-#define wxTRANSLATE(str) _T(str)
+#define wxTRANSLATE(str) str
 
 // ----------------------------------------------------------------------------
 // forward decls
 
 // ----------------------------------------------------------------------------
 // forward decls
@@ -233,6 +236,7 @@ enum wxLanguage
     wxLANGUAGE_ROMANIAN,
     wxLANGUAGE_RUSSIAN,
     wxLANGUAGE_RUSSIAN_UKRAINE,
     wxLANGUAGE_ROMANIAN,
     wxLANGUAGE_RUSSIAN,
     wxLANGUAGE_RUSSIAN_UKRAINE,
+    wxLANGUAGE_SAMI,
     wxLANGUAGE_SAMOAN,
     wxLANGUAGE_SANGHO,
     wxLANGUAGE_SANSKRIT,
     wxLANGUAGE_SAMOAN,
     wxLANGUAGE_SANGHO,
     wxLANGUAGE_SANSKRIT,
@@ -296,6 +300,7 @@ enum wxLanguage
     wxLANGUAGE_UZBEK,
     wxLANGUAGE_UZBEK_CYRILLIC,
     wxLANGUAGE_UZBEK_LATIN,
     wxLANGUAGE_UZBEK,
     wxLANGUAGE_UZBEK_CYRILLIC,
     wxLANGUAGE_UZBEK_LATIN,
+    wxLANGUAGE_VALENCIAN,
     wxLANGUAGE_VIETNAMESE,
     wxLANGUAGE_VOLAPUK,
     wxLANGUAGE_WELSH,
     wxLANGUAGE_VIETNAMESE,
     wxLANGUAGE_VOLAPUK,
     wxLANGUAGE_WELSH,
@@ -321,14 +326,29 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo
 {
     int Language;                   // wxLanguage id
     wxString CanonicalName;         // Canonical name, e.g. fr_FR
 {
     int Language;                   // wxLanguage id
     wxString CanonicalName;         // Canonical name, e.g. fr_FR
-#ifdef __WIN32__
+#ifdef __WXMSW__
     wxUint32 WinLang,               // Win32 language identifiers
              WinSublang;
     wxUint32 WinLang,               // Win32 language identifiers
              WinSublang;
-#endif // __WIN32__
+#endif // __WXMSW__
     wxString Description;           // human-readable name of the language
     wxLayoutDirection LayoutDirection;
     wxString Description;           // human-readable name of the language
     wxLayoutDirection LayoutDirection;
+
+#ifdef __WXMSW__
+    // return the LCID corresponding to this language
+    wxUint32 GetLCID() const;
+#endif // __WXMSW__
+
+    // return the locale name corresponding to this language usable with
+    // setlocale() on the current system
+    wxString GetLocaleName() const;
 };
 
 };
 
+// for Unix systems GetLocaleName() is trivial so implement it inline here, for
+// MSW it's implemented in intl.cpp
+#ifndef __WXMSW__
+inline wxString wxLanguageInfo::GetLocaleName() const { return CanonicalName; }
+#endif // !__WXMSW__
+
 // ----------------------------------------------------------------------------
 // wxLocaleCategory: the category of locale settings
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxLocaleCategory: the category of locale settings
 // ----------------------------------------------------------------------------
@@ -600,12 +620,12 @@ inline const wxString& wxGetTranslation(const wxString& str1,
 
 #if !defined(WXINTL_NO_GETTEXT_MACRO)
     #if !defined(_)
 
 #if !defined(WXINTL_NO_GETTEXT_MACRO)
     #if !defined(_)
-        #define _(s)                 (_T(s))
+        #define _(s)                 (s)
     #endif
     #endif
-    #define wxPLURAL(sing, plur, n)  ((n) == 1 ? _T(sing) : _T(plur))
+    #define wxPLURAL(sing, plur, n)  ((n) == 1 ? (sing) : (plur))
 #endif
 
 #endif
 
-#define wxTRANSLATE(str) _T(str)
+#define wxTRANSLATE(str) str
 
 // NB: we use a template here in order to avoid using
 //     wxLocale::GetUntranslatedString() above, which would be required if
 
 // NB: we use a template here in order to avoid using
 //     wxLocale::GetUntranslatedString() above, which would be required if
@@ -635,10 +655,10 @@ inline TString wxGetTranslation(TString str1, TString str2, size_t n,
 // wxTRANSLATE) too
 #if !defined(WXINTL_NO_GETTEXT_MACRO)
     #if !defined(gettext_noop)
 // wxTRANSLATE) too
 #if !defined(WXINTL_NO_GETTEXT_MACRO)
     #if !defined(gettext_noop)
-        #define gettext_noop(str) _T(str)
+        #define gettext_noop(str) (str)
     #endif
     #if !defined(N_)
     #endif
     #if !defined(N_)
-        #define N_(s)             _T(s)
+        #define N_(s)             (s)
     #endif
 #endif
 
     #endif
 #endif