#include <wx/translation.h>
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():
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:
This class is only available on Windows.
Protected Member Functions | |
virtual wxString | GetResourceType () const |
Returns resource type to use for translations. More... | |
virtual WXHINSTANCE | GetModule () const |
Returns handle of the module to load resources from. More... | |
Additional Inherited Members | |
Public Member Functions inherited from wxTranslationsLoader | |
wxTranslationsLoader () | |
Trivial default constructor. More... | |
virtual wxMsgCatalog * | LoadCatalog (const wxString &domain, const wxString &lang)=0 |
Called to load requested catalog. More... | |
virtual wxArrayString | GetAvailableTranslations (const wxString &domain) const =0 |
Implements wxTranslations::GetAvailableTranslations(). More... | |
|
protectedvirtual |
Returns handle of the module to load resources from.
By default, the main executable is used.
|
protectedvirtual |
Returns resource type to use for translations.
Default type is "MOFILE".