@library{wxbase}
@category{misc}
- @see @ref overview_internationalization, @ref page_samples_internat, wxXLocale
+ @see @ref overview_i18n, @ref page_samples_internat, wxXLocale
*/
class wxLocale
{
@remarks Domains are searched in the last to first order, i.e. catalogs
added later override those added before.
*/
- const wxString& GetString(const wxString& origString,
- const wxString& domain = wxEmptyString) const;
+ virtual const wxString& GetString(const wxString& origString,
+ const wxString& domain = wxEmptyString) const;
/**
Retrieves the translation for a string in all loaded domains unless the @a domain
@remarks Domains are searched in the last to first order, i.e. catalogs
added later override those added before.
*/
- const wxString& GetString(const wxString& origString,
- const wxString& origString2,
- size_t n,
- const wxString& domain = wxEmptyString) const;
+ virtual const wxString& GetString(const wxString& origString,
+ const wxString& origString2, size_t n,
+ const wxString& domain = wxEmptyString) const;
/**
Returns current platform-specific locale name as passed to setlocale().
iso8859-2 and windows-1250. See @ref overview_nonenglish for
detailed description of this behaviour.
Note that this flag is meaningless in Unicode build.
+
+ @return @true on success or @false if the given locale couldn't be set.
+ */
+ bool Init(int language = wxLANGUAGE_DEFAULT,
+ int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
+
+ /**
+ @deprecated
+ This form is deprecated, use the other one unless you know what you are doing.
+
@param name
The name of the locale. Only used in diagnostic messages.
@param short
between well-known pair like iso8859-1 and windows-1252 or iso8859-2
and windows-1250.
See @ref overview_nonenglish for detailed description of this behaviour.
-
- @return @true on success or @false if the given locale couldn't be set.
- */
- bool Init(int language = wxLANGUAGE_DEFAULT,
- int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
-
- /**
- @deprecated
- This form is deprecated, use the other one unless you know what you are doing.
*/
- bool Init(const wxString& name,
- const wxString& short = wxEmptyString,
- const wxString& locale = wxEmptyString,
- bool bLoadDefault = true,
+ bool Init(const wxString& name, const wxString& short = wxEmptyString,
+ const wxString& locale = wxEmptyString, bool bLoadDefault = true,
bool bConvertEncoding = false);
/**
@see AddCatalog()
*/
- bool IsLoaded(const char* domain) const;
+ bool IsLoaded(const wxString& domain) const;
/**
Returns @true if the locale could be set successfully.