// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+// WARNING: Parts of this file are generated. See misc/languages/README for
+// details.
+
#ifndef _WX_INTL_H_
#define _WX_INTL_H_
wxLANGUAGE_ROMANIAN,
wxLANGUAGE_RUSSIAN,
wxLANGUAGE_RUSSIAN_UKRAINE,
+ wxLANGUAGE_SAMI,
wxLANGUAGE_SAMOAN,
wxLANGUAGE_SANGHO,
wxLANGUAGE_SANSKRIT,
wxLANGUAGE_UZBEK,
wxLANGUAGE_UZBEK_CYRILLIC,
wxLANGUAGE_UZBEK_LATIN,
+ wxLANGUAGE_VALENCIAN,
wxLANGUAGE_VIETNAMESE,
wxLANGUAGE_VOLAPUK,
wxLANGUAGE_WELSH,
// 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
// ----------------------------------------------------------------------------
// 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
};
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
};
// 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; }
static wxLanguageInfoArray *ms_languagesDB;
- DECLARE_NO_COPY_CLASS(wxLocale)
+ wxDECLARE_NO_COPY_CLASS(wxLocale);
};
// ----------------------------------------------------------------------------