X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/611bed35118d838abdec90a23a90e492a6cc75d1..508bd1654f3eb44327fb84ecd2e2181959dac13b:/include/wx/translation.h diff --git a/include/wx/translation.h b/include/wx/translation.h index abd92a6d27..67b2bd8afc 100644 --- a/include/wx/translation.h +++ b/include/wx/translation.h @@ -48,6 +48,7 @@ // forward decls // ---------------------------------------------------------------------------- +class WXDLLIMPEXP_FWD_BASE wxArrayString; class WXDLLIMPEXP_FWD_BASE wxTranslationsLoader; class WXDLLIMPEXP_FWD_BASE wxLocale; @@ -61,6 +62,12 @@ wxDECLARE_SCOPED_PTR(wxPluralFormsCalculator, wxPluralFormsCalculatorPtr) class WXDLLIMPEXP_BASE wxMsgCatalog { public: + // Ctor is protected, because CreateFromXXX functions must be used, + // but destruction should be unrestricted +#if !wxUSE_UNICODE + ~wxMsgCatalog(); +#endif + // load the catalog from disk or from data; caller is responsible for // deleting them if not NULL static wxMsgCatalog *CreateFromFile(const wxString& filename, @@ -82,9 +89,6 @@ protected: , m_conv(NULL) #endif {} -#if !wxUSE_UNICODE - ~wxMsgCatalog(); -#endif private: // variable pointing to the next element in a linked list (or NULL) @@ -125,6 +129,9 @@ public: void SetLanguage(wxLanguage lang); void SetLanguage(const wxString& lang); + // get languages available for this app + wxArrayString GetAvailableTranslations(const wxString& domain) const; + // add standard wxWidgets catalog ("wxstd") bool AddStdCatalog(); @@ -189,6 +196,8 @@ public: virtual wxMsgCatalog *LoadCatalog(const wxString& domain, const wxString& lang) = 0; + + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const = 0; }; @@ -201,6 +210,8 @@ public: virtual wxMsgCatalog *LoadCatalog(const wxString& domain, const wxString& lang); + + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const; }; @@ -213,6 +224,8 @@ public: virtual wxMsgCatalog *LoadCatalog(const wxString& domain, const wxString& lang); + virtual wxArrayString GetAvailableTranslations(const wxString& domain) const; + protected: // returns resource type to use for translations virtual wxString GetResourceType() const { return "MOFILE"; }