X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fadc2df6823d988f7a264b94e69a7e1bbcac1337..53081fa5a42f4386cc06fd8706aad89cd5b3bf71:/interface/wx/intl.h diff --git a/interface/wx/intl.h b/interface/wx/intl.h index d31d7193d8..21f9ec1825 100644 --- a/interface/wx/intl.h +++ b/interface/wx/intl.h @@ -263,12 +263,12 @@ enum wxLanguage /** - wxLanguageInfo: encapsulates wxLanguage to OS native lang.desc. + wxLanguageInfo: encapsulates ::wxLanguage to 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 wxLANGUAGE_USER_DEFINED. int Language; wxString CanonicalName; //!< Canonical name, e.g. fr_FR. #ifdef __WXMSW__ @@ -381,7 +381,6 @@ public: */ virtual ~wxLocale(); - //@{ /** Add a catalog for use with the current locale: it is searched for in standard places (current directory first, then the system one), but you may also prepend @@ -390,33 +389,50 @@ public: All loaded catalogs will be used for message lookup by GetString() for the current locale. - Returns @true if catalog was successfully loaded, @false otherwise (which might - mean that the catalog is not found or that it isn't in the correct format). - - The second form of this method takes two additional arguments, - @a msgIdLanguage and @a msgIdCharset. - - @a msgIdLanguage specifies the language of "msgid" strings in source code - (i.e. arguments to GetString(), wxGetTranslation() and the _() macro). - It is used if AddCatalog() cannot find any catalog for current language: - if the language is same as source code language, then strings from source - code are used instead. - - @a msgIdCharset lets you specify the charset used for msgids in sources - in case they use 8-bit characters (e.g. German or French strings). - This argument has no effect in Unicode build, because literals in sources are - Unicode strings; you have to use compiler-specific method of setting the right - charset when compiling with Unicode. - - By default (i.e. when you use the first form), msgid strings are assumed + In this overload, @c msgid strings are assumed to be in English and written only using 7-bit ASCII characters. If you have to deal with non-English strings or 8-bit characters in the source code, see the instructions in @ref overview_nonenglish. + + @return + @true if catalog was successfully loaded, @false otherwise (which might + mean that the catalog is not found or that it isn't in the correct format). */ bool AddCatalog(const wxString& domain); + + /** + Add a catalog for use with the current locale: it is searched for in standard + places (current directory first, then the system one), but you may also prepend + additional directories to the search path with AddCatalogLookupPathPrefix(). + + All loaded catalogs will be used for message lookup by GetString() for + the current locale. + + This overload takes two additional arguments, @a msgIdLanguage and @a msgIdCharset. + + @param domain + The catalog domain to add. + + @param msgIdLanguage + Specifies the language of "msgid" strings in source code + (i.e. arguments to GetString(), wxGetTranslation() and the _() macro). + It is used if AddCatalog() cannot find any catalog for current language: + if the language is same as source code language, then strings from source + code are used instead. + + @param msgIdCharset + Lets you specify the charset used for msgids in sources + in case they use 8-bit characters (e.g. German or French strings). + This argument has no effect in Unicode build, because literals in sources are + Unicode strings; you have to use compiler-specific method of setting the right + charset when compiling with Unicode. + + @return + @true if catalog was successfully loaded, @false otherwise (which might + mean that the catalog is not found or that it isn't in the correct format). + */ bool AddCatalog(const wxString& domain, wxLanguage msgIdLanguage, const wxString& msgIdCharset); - //@} /** Add a prefix to the catalog lookup path: the message catalog files will @@ -469,10 +485,10 @@ public: const wxString& domain = wxEmptyString) const; /** - Returns wxLanguage() constant of current language. + Returns the ::wxLanguage constant of current language. Note that you can call this function only if you used the form of - Init() that takes wxLanguage argument. + Init() that takes ::wxLanguage argument. */ int GetLanguage() const; @@ -579,7 +595,7 @@ public: /** Tries to detect the user's default language setting. - Returns wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing + Returns the ::wxLanguage value or @b wxLANGUAGE_UNKNOWN if the language-guessing algorithm failed. */ static int GetSystemLanguage() const; @@ -596,7 +612,7 @@ public: try to translate the messages using the message catalogs for this locale. @param language - wxLanguage identifier of the locale. + ::wxLanguage identifier of the locale. @c wxLANGUAGE_DEFAULT has special meaning -- wxLocale will use system's default language (see GetSystemLanguage()). @param flags @@ -648,11 +664,11 @@ public: this locale. For example in Windows 2000 and Windows XP, support for many locales is not installed by default. Returns @true if the locale is supported. - The argument @a lang is the wxLanguage identifier. To obtain this for a - given a two letter ISO language code, use - FindLanguageInfo() to obtain its - wxLanguageInfo structure. See AddLanguage() for - the wxLanguageInfo description. + + The argument @a lang is the ::wxLanguage identifier. To obtain this for a + given a two letter ISO language code, use FindLanguageInfo() to obtain its + wxLanguageInfo structure. + See AddLanguage() for the wxLanguageInfo description. @since 2.7.1. */ @@ -666,7 +682,7 @@ public: @see AddCatalog() */ - bool IsLoaded(const char* domain) const; + bool IsLoaded(const wxString& domain) const; /** Returns @true if the locale could be set successfully.