wxTranslationsLoader Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxTranslationsLoader Class Referenceabstract

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/translation.h>`

Inheritance diagram for wxTranslationsLoader:
[legend]

## Detailed Description

Abstraction of translations discovery and loading.

This interface makes it possible to override wxWidgets' default catalogs loading mechanism and load MO files from locations other than the filesystem (e.g. embed them in executable).

Implementations must implement the LoadCatalog() method.

See also
  wxFileTranslationsLoader, wxResourceTranslationsLoader

Since
  2.9.1

## Public Member Functions
| wxTranslationsLoader ()
| Trivial default constructor.
virtual wxMsgCatalog * | LoadCatalog (const wxString &domain, const wxString &lang)=0
| Called to load requested catalog.
virtual wxArrayString | GetAvailableTranslations (const wxString &domain) const =0
| Implements wxTranslations::GetAvailableTranslations().

## Constructor & Destructor Documentation

## ◆ wxTranslationsLoader()

wxTranslationsLoader::wxTranslationsLoader | ( |  | ) |

Trivial default constructor.

## Member Function Documentation

## ◆ GetAvailableTranslations()

virtual wxArrayString wxTranslationsLoader::GetAvailableTranslations | ( | const wxString & | domain | ) | const
| pure virtual

Implements wxTranslations::GetAvailableTranslations().

## ◆ LoadCatalog()

virtual wxMsgCatalog * wxTranslationsLoader::LoadCatalog | ( | const wxString & | domain,
|  | const wxString & | lang )
| pure virtual

Called to load requested catalog.

If the catalog is found, LoadCatalog() should create wxMsgCatalog instance with its data and return it. The caller will take ownership of the catalog.

Parameters

  domain | Domain to load.
  lang | Language to look for. This is "canonical name" (see wxLocale::GetCanonicalName()), i.e. ISO 639 code, possibly combined with country code or additional modifiers (e.g. "fr", "en_GB" or "ca@valencia").

Returns
  Loaded catalog or NULL on failure.