Language Pack Translator. More...
#include <deTranslatorEntry.h>
Public Member Functions | |
Constructors and Destructors | |
| deTranslatorEntry (const char *name) | |
| Creates a new translator entry object with the given name. | |
| ~deTranslatorEntry () | |
| Cleans up the translator. | |
Management | |
| const char * | GetName () const |
| Retrieves the name of the entry. | |
| const decUnicodeString & | GetText () const |
| Retrieves the text. | |
| void | SetText (const decUnicodeString &text) |
| Sets the text. | |
Language Pack Translator.
Provides a convenient way to retrieve text in language specific translations using language packs. The translator supports sections to organize the individual translation entries. Most of the time a game comes equiped with a large amount of objects with identical or very similar text strings. A section can be used for such individual objects to access them in a quick and easy way ( avoiding a huge index table ). Every translator stores up to two language packs. One is declared the default ( or fallback ) language pack whereas the other is the current language pack. If a string has no translation in the current language pack the same string in the default language pack is used instead. At least the default language pack has to be set before a translation can be done.
| deTranslatorEntry::deTranslatorEntry | ( | const char * | name ) |
Creates a new translator entry object with the given name.
| deTranslatorEntry::~deTranslatorEntry | ( | ) |
Cleans up the translator.
| const char* deTranslatorEntry::GetName | ( | ) | const [inline] |
Retrieves the name of the entry.
| const decUnicodeString& deTranslatorEntry::GetText | ( | ) | const [inline] |
Retrieves the text.
| void deTranslatorEntry::SetText | ( | const decUnicodeString & | text ) |
Sets the text.
1.7.2