+/**
+ This loader makes it possible to load translations from Windows
+ resources.
+
+ If you wish to store translation MO files in resources, you have to
+ enable this loader before calling wxTranslations::AddCatalog() or
+ wxLocale::AddCatalog():
+
+ @code
+ wxTranslations::Get()->SetLoader(new wxResourceTranslationsLoader);
+ @endcode
+
+ Translations are stored in resources as compiled MO files, with type
+ set to "MOFILE" (unless you override GetResourceType()) and name
+ consisting of the domain, followed by underscore, followed by language
+ identification. For example, the relevant part of .rc file would look
+ like this:
+
+ @code
+ myapp_de MOFILE "catalogs/de/myapp.mo"
+ myapp_fr MOFILE "catalogs/fr/myapp.mo"
+ myapp_en_GB MOFILE "catalogs/en_GB/myapp.mo"
+ @endcode
+
+ This class is only available on Windows.
+
+ @since 2.9.1
+ */
+class wxResourceTranslationsLoader : public wxTranslationsLoader
+{
+protected:
+ /**
+ Returns resource type to use for translations.
+
+ Default type is "MOFILE".
+ */
+ virtual wxString GetResourceType() const;
+
+ /**
+ Returns handle of the module to load resources from.
+
+ By default, the main executable is used.
+ */
+ virtual WXHINSTANCE GetModule() const;
+};
+
+
+/**
+ Represents a loaded translations message catalog.
+
+ This class should only be used directly by wxTranslationsLoader
+ implementations.
+
+ @since 2.9.1
+ */
+class wxMsgCatalog
+{
+public:
+ /**
+ Creates catalog loaded from a MO file.
+
+ @param filename Path to the MO file to load.
+ @param domain Catalog's domain. This typically matches
+ the @a filename.
+
+ @return Successfully loaded catalog or NULL on failure.
+ */
+ static wxMsgCatalog *CreateFromFile(const wxString& filename,
+ const wxString& domain);
+
+ /**
+ Creates catalog from MO file data in memory buffer.
+
+ @param data Data in MO file format.
+ @param domain Catalog's domain. This typically matches
+ the @a filename.
+
+ @return Successfully loaded catalog or NULL on failure.
+ */
+ static wxMsgCatalog *CreateFromData(const wxScopedCharBuffer& data,
+ const wxString& domain);
+};