/**
This is the layout direction stored in wxLanguageInfo and returned by
- wxApp::GetLayoutDirection() for RTL (right-to-left) languages support.
+ wxApp::GetLayoutDirection(), wxWindow::GetLayoutDirection(),
+ wxDC::GetLayoutDirection() for RTL (right-to-left) languages support.
*/
enum wxLayoutDirection
{
};
/**
- wxLanguageInfo: encapsulates ::wxLanguage to OS native lang.desc.
- translation information
+ Encapsulates a ::wxLanguage indentifier together with OS-specific information
+ related to that language.
*/
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 when defining your own
+ /// language info structure.
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;
};
+/**
+ The category of locale settings. See wxLocale::GetInfo().
+*/
+enum wxLocaleCategory
+{
+ /// (any) numbers
+ wxLOCALE_CAT_NUMBER,
+
+ /// date/time
+ wxLOCALE_CAT_DATE,
+
+ /// monetary value
+ wxLOCALE_CAT_MONEY,
+
+ wxLOCALE_CAT_MAX
+};
+
+/**
+ The values understood by wxLocale::GetInfo().
+*/
+enum wxLocaleInfo
+{
+ /// The thounsands separator
+ wxLOCALE_THOUSANDS_SEP,
+
+ /// The character used as decimal point
+ wxLOCALE_DECIMAL_POINT
+};
+
+
/**
@class wxLocale
@endWxPerlOnly
@library{wxbase}
- @category{misc}
+ @category{cfg}
@see @ref overview_i18n, @ref page_samples_internat, wxXLocale
*/
/**
Tries to detect the user's default language setting.
- Returns the ::wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing
+
+ Returns the ::wxLanguage value or @c wxLANGUAGE_UNKNOWN if the language-guessing
algorithm failed.
*/
static int GetSystemLanguage();
+ /**
+ Get the values of the given locale-dependent datum.
+
+ The current locale is used, the US default value is returned if everything
+ else fails.
+ */
+ static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat);
+
/**
Initializes the wxLocale instance.