Hashed msgid -> UTF-8 string table loaded from a single binary .lang blob (see loadLanguage()). More...
#include <GuiTextTranslator.h>
Public Member Functions | |
| bool | loadLanguage (const uint8_t *buffer, size_t size) |
| Loads and parses a translation file from a memory buffer. | |
| const char * | getText (const char *msgid) const |
| Retrieves the translated UTF-8 string for a given ASCII message ID. | |
| void | clear () |
| Clears the current translation dictionary and frees memory. | |
Hashed msgid -> UTF-8 string table loaded from a single binary .lang blob (see loadLanguage()).
GuiText and other classes call getText() to resolve a message ID to translated text.
Definition at line 15 of file GuiTextTranslator.h.
| GuiTextTranslator::GuiTextTranslator | ( | ) |
Definition at line 14 of file GuiTextTranslator.cpp.
| GuiTextTranslator::~GuiTextTranslator | ( | ) |
Definition at line 18 of file GuiTextTranslator.cpp.
| void GuiTextTranslator::clear | ( | ) |
Clears the current translation dictionary and frees memory.
Definition at line 161 of file GuiTextTranslator.cpp.
| const char * GuiTextTranslator::getText | ( | const char * | msgid | ) | const |
Retrieves the translated UTF-8 string for a given ASCII message ID.
| msgid | The English text/ID to translate |
Definition at line 248 of file GuiTextTranslator.cpp.
| bool GuiTextTranslator::loadLanguage | ( | const uint8_t * | buffer, |
| size_t | size ) |
Loads and parses a translation file from a memory buffer.
| buffer | Pointer to the loaded file data |
| size | Length of the buffer in bytes |
Definition at line 190 of file GuiTextTranslator.cpp.