X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5c8403a37f92375e8b94d7c8f6f1872b1fdc981..b5fe7ca67bf3121959a0b5a59afd00c1708f2f03:/interface/wx/intl.h diff --git a/interface/wx/intl.h b/interface/wx/intl.h index 21f9ec1825..6940db7779 100644 --- a/interface/wx/intl.h +++ b/interface/wx/intl.h @@ -17,7 +17,7 @@ */ enum wxLanguage { - /// User's default/preffered language as got from OS. + /// User's default/preferred language as got from OS. wxLANGUAGE_DEFAULT, /// Unknown language, returned if wxLocale::GetSystemLanguage fails. @@ -263,28 +263,50 @@ enum wxLanguage /** - wxLanguageInfo: encapsulates ::wxLanguage to OS native lang.desc. + This is the layout direction stored in wxLanguageInfo and returned by + wxApp::GetLayoutDirection(), wxWindow::GetLayoutDirection(), + wxDC::GetLayoutDirection() for RTL (right-to-left) languages support. +*/ +enum wxLayoutDirection +{ + wxLayout_Default, + wxLayout_LeftToRight, + wxLayout_RightToLeft +}; + +/** + Encapsulates ::wxLanguage in a OS native lang.desc. translation information */ struct WXDLLIMPEXP_BASE wxLanguageInfo { - /// ::wxLanguage id. It should be greater than wxLANGUAGE_USER_DEFINED. + /// ::wxLanguage id. It should be greater than @c wxLANGUAGE_USER_DEFINED. int Language; - wxString CanonicalName; //!< Canonical name, e.g. fr_FR. -#ifdef __WXMSW__ - wxUint32 WinLang, //!< Win32 language identifiers (LANG_xxxx, SUBLANG_xxxx). - WinSublang; -#endif // __WXMSW__ - wxString Description; //!< Human-readable name of the language. + + /// Canonical name of the language, e.g. @c fr_FR. + wxString CanonicalName; + + //@{ + /** + Win32 language identifiers (LANG_xxxx, SUBLANG_xxxx). + + @onlyfor{wxmsw} + */ + wxUint32 WinLang, WinSublang; + //@} + + /// Human-readable name of the language. + wxString Description; + + /// The layout direction used for this language. wxLayoutDirection LayoutDirection; -#ifdef __WXMSW__ /// Return the LCID corresponding to this language. + /// @onlyfor{wxmsw} wxUint32 GetLCID() const; -#endif // __WXMSW__ /// Return the locale name corresponding to this language usable with - /// setlocale() on the current system + /// @c setlocale() on the current system. wxString GetLocaleName() const; }; @@ -339,7 +361,7 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo @endWxPerlOnly @library{wxbase} - @category{misc} + @category{cfg} @see @ref overview_i18n, @ref page_samples_internat, wxXLocale */ @@ -461,7 +483,7 @@ public: @see GetLanguageInfo() */ - static wxLanguageInfo* FindLanguageInfo(const wxString& locale); + static const wxLanguageInfo* FindLanguageInfo(const wxString& locale); /** Returns the canonical form of current locale name. Canonical form is the @@ -502,7 +524,7 @@ public: as an argument to this function and in this case the result of GetSystemLanguage() is used. */ - static wxLanguageInfo* GetLanguageInfo(int lang) const; + static const wxLanguageInfo* GetLanguageInfo(int lang); /** Returns English name of the given language or empty string if this @@ -510,7 +532,7 @@ public: See GetLanguageInfo() for a remark about special meaning of @c wxLANGUAGE_DEFAULT. */ - static wxString GetLanguageName(int lang) const; + static wxString GetLanguageName(int lang); /** Returns the locale name as passed to the constructor or Init(). @@ -581,7 +603,7 @@ public: Returns wxFontEncoding() value or @c wxFONTENCODING_SYSTEM if it couldn't be determined. */ - static wxFontEncoding GetSystemEncoding() const; + static wxFontEncoding GetSystemEncoding(); /** Tries to detect the name of the user's default font encoding. @@ -591,14 +613,14 @@ public: Returns a user-readable string value or an empty string if it couldn't be determined. */ - static wxString GetSystemEncodingName() const; + static wxString GetSystemEncodingName(); /** Tries to detect the user's default language setting. Returns the ::wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed. */ - static int GetSystemLanguage() const; + static int GetSystemLanguage(); /** Initializes the wxLocale instance. @@ -697,7 +719,7 @@ public: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_string */ +/** @addtogroup group_funcmacro_string */ //@{ /**