You.i Engine
CYIMOTranslator Class Reference

Detailed Description

A translator object used for parsing and indexing localisation strings found in ".mo" binary files. These objects are available through the CYITranslation interface and should be primarily loaded through the CYIAssetLoader, which will provide a CYIAssetTranslation object.

See also

#include <utility/YiMOTranslator.h>

Inheritance diagram for CYIMOTranslator:

Public Member Functions

 CYIMOTranslator ()
virtual ~CYIMOTranslator ()
virtual bool LoadTranslation (const CYIString &filename) override
virtual bool LoadTranslation (const uint8_t *pData, size_t dataSize) override
virtual CYIString Translate (const CYIString &text) override
- Public Member Functions inherited from CYITranslator
 CYITranslator ()
virtual ~CYITranslator ()

Constructor & Destructor Documentation

◆ CYIMOTranslator()

CYIMOTranslator::CYIMOTranslator ( )

◆ ~CYIMOTranslator()

virtual CYIMOTranslator::~CYIMOTranslator ( )

Member Function Documentation

◆ LoadTranslation() [1/2]

virtual bool CYIMOTranslator::LoadTranslation ( const CYIString filename)

Load the ".mo" translation file using the absolute location provided by filename. This function will return true if successful.

Implements CYITranslator.

◆ LoadTranslation() [2/2]

virtual bool CYIMOTranslator::LoadTranslation ( const uint8_t *  pData,
size_t  dataSize 

Loads a ".mo" translation file from memory. This function will return true if successful.

Implements CYITranslator.

◆ Translate()

virtual CYIString CYIMOTranslator::Translate ( const CYIString text)

Using the localised translation key text, which is typically the original English text, it will find and return the matching localised text.

Implements CYITranslator.

The documentation for this class was generated from the following file: