X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea65760d5c9b3bd69cd6b2834abcb7c9dc514321..411a1c35ff2e9be0bef6e2997f00dded357f2906:/include/wx/intl.h diff --git a/include/wx/intl.h b/include/wx/intl.h index 57a3ec0638..28bb8ce166 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -10,6 +10,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// WARNING: Parts of this file are generated. See misc/languages/README for +// details. + #ifndef _WX_INTL_H_ #define _WX_INTL_H_ @@ -68,13 +71,18 @@ class wxMsgCatalog; // --- --- --- generated code begins here --- --- --- -// This enum is generated by misc/languages/genlang.py -// When making changes, please put them into misc/languages/langtabl.txt +/** + The languages supported by wxLocale. + + This enum is generated by misc/languages/genlang.py + When making changes, please put them into misc/languages/langtabl.txt +*/ enum wxLanguage { - // user's default/preffered language as got from OS: + /// User's default/preffered language as got from OS. wxLANGUAGE_DEFAULT, - // unknown language, if wxLocale::GetSystemLanguage fails: + + /// Unknown language, returned if wxLocale::GetSystemLanguage fails. wxLANGUAGE_UNKNOWN, wxLANGUAGE_ABKHAZIAN, @@ -102,6 +110,7 @@ enum wxLanguage wxLANGUAGE_ARABIC_YEMEN, wxLANGUAGE_ARMENIAN, wxLANGUAGE_ASSAMESE, + wxLANGUAGE_ASTURIAN, wxLANGUAGE_AYMARA, wxLANGUAGE_AZERI, wxLANGUAGE_AZERI_CYRILLIC, @@ -233,6 +242,7 @@ enum wxLanguage wxLANGUAGE_ROMANIAN, wxLANGUAGE_RUSSIAN, wxLANGUAGE_RUSSIAN_UKRAINE, + wxLANGUAGE_SAMI, wxLANGUAGE_SAMOAN, wxLANGUAGE_SANGHO, wxLANGUAGE_SANSKRIT, @@ -296,6 +306,7 @@ enum wxLanguage wxLANGUAGE_UZBEK, wxLANGUAGE_UZBEK_CYRILLIC, wxLANGUAGE_UZBEK_LATIN, + wxLANGUAGE_VALENCIAN, wxLANGUAGE_VIETNAMESE, wxLANGUAGE_VOLAPUK, wxLANGUAGE_WELSH, @@ -306,7 +317,7 @@ enum wxLanguage wxLANGUAGE_ZHUANG, wxLANGUAGE_ZULU, - // for custom, user-defined languages: + /// For custom, user-defined languages. wxLANGUAGE_USER_DEFINED }; @@ -332,8 +343,18 @@ struct WXDLLIMPEXP_BASE wxLanguageInfo // 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 // ---------------------------------------------------------------------------- @@ -349,6 +370,10 @@ enum wxLocaleCategory // monetary value wxLOCALE_CAT_MONEY, + // default category for wxLocaleInfo values which only apply to a single + // category (e.g. wxLOCALE_SHORT_DATE_FMT) + wxLOCALE_CAT_DEFAULT, + wxLOCALE_CAT_MAX }; @@ -358,11 +383,21 @@ enum wxLocaleCategory enum wxLocaleInfo { - // the thounsands separator + // the thousands separator (for wxLOCALE_CAT_NUMBER or MONEY) wxLOCALE_THOUSANDS_SEP, - // the character used as decimal point - wxLOCALE_DECIMAL_POINT + // the character used as decimal point (for wxLOCALE_CAT_NUMBER or MONEY) + wxLOCALE_DECIMAL_POINT, + + // the stftime()-formats used for short/long date and time representations + // (under some platforms short and long date formats are the same) + // + // NB: these elements should appear in this order, code in GetInfo() relies + // on it + wxLOCALE_SHORT_DATE_FMT, + wxLOCALE_LONG_DATE_FMT, + wxLOCALE_DATE_TIME_FMT, + wxLOCALE_TIME_FMT }; @@ -434,7 +469,8 @@ public: // 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); + static wxString GetInfo(wxLocaleInfo index, + wxLocaleCategory cat = wxLOCALE_CAT_DEFAULT); // return true if the locale was set successfully bool IsOk() const { return m_pszOldLocale != NULL; } @@ -561,7 +597,7 @@ private: static wxLanguageInfoArray *ms_languagesDB; - DECLARE_NO_COPY_CLASS(wxLocale) + wxDECLARE_NO_COPY_CLASS(wxLocale); }; // ----------------------------------------------------------------------------