Texts
touchgfx/Texts.hpp
Class for setting language and getting texts. The language set will determine which texts will be used in the application.
Public Functions
LanguageId | getLanguage() |
Gets the current language. | |
void | setLanguage(LanguageId id) |
Sets the current language for texts. | |
void | setTranslation(LanguageId id, const void * translation) |
Adds or replaces a translation. | |
const Unicode::UnicodeChar * | getText(TypedTextId id) const |
Get text in the set language. | |
Public Functions Documentation
getLanguage
static LanguageId getLanguage | ( | ) |
Gets the current language.
Returns:
The id of the language.
setLanguage
static void setLanguage | ( | LanguageId | id | ) | |
Sets the current language for texts.
Parameters:
id | The id of the language. |
setTranslation
static void setTranslation | ( | LanguageId | id , | ||
const void * | translation | ||||
) |
Adds or replaces a translation.
This function allows an application to add a translation at runtime.
Parameters:
id | The id of the language to add or replace. |
translation | A pointer to the translation in flash or RAM. |
getText
const Unicode::UnicodeChar * getText | ( | TypedTextId | id | ) | |
Get text in the set language.
Parameters:
id | The id of the text to lookup. |
Returns:
The text.
See also: