The application code can access strings for multiple languages. Once set the language identifier, the module automatically returns the correct strings.
Files | |
file | stringtable.c |
This file implements the string tables for multi language support. | |
file | stringtable.h |
This file includes the Netzer string table defines and API. | |
Enumerations | |
enum | LanguageIDs_t { LANGID_NOTSPECIFIED = -1, LANGID_GERMAN = 0, LANGID_ENGLISH, LANGID_NETHERLANDS, LANGID_SPANISH, LANGID_COUNT } |
The IDs of supported languages. More... | |
enum | StringTableIDs_t |
String ID table for accessing the string table entries. | |
enum | StateTableIDs_t |
Error ID table for accessing the error string table entries. | |
Functions | |
void | StrTbl_SetLanguage (LanguageIDs_t LangId) |
The function sets the actual string table for this session (not permanently). | |
void | StrTbl_GetString (uint8_t *pString, uint16_t StringId) |
The function copies the string with the given ID to the given RAM location. | |
ROM char * | StringGetPointer (uint16_t StringId) |
The function delivers a ROM pointer to the given string ID. | |
ROM char * | StringGetLanguageStringPointer (uint8_t LanguageId, uint16_t StringId) |
The function delivers a ROM pointer to the given string ID on a given string table. | |
ROM char * | StringGetStatePointer (StateTableIDs_t StateId) |
The function delivers a ROM pointer to the given string ID from the state table. |
enum LanguageIDs_t |
The IDs of supported languages.
ROM char* StringGetLanguageStringPointer | ( | uint8_t | LanguageId, | |
uint16_t | StringId | |||
) |
The function delivers a ROM pointer to the given string ID on a given string table.
The language ID which was set before with StrTbl_SetLanguage is not affected due this function.
LanguageId | One of the valid language IDs like LANGID_GERMAN or LANGID_ENGLISH for example. | |
StringId | String ID of the string to load. |
ROM char* StringGetPointer | ( | uint16_t | StringId | ) |
The function delivers a ROM pointer to the given string ID.
StringId | String ID of the string to load. |
ROM char* StringGetStatePointer | ( | StateTableIDs_t | StateId | ) |
The function delivers a ROM pointer to the given string ID from the state table.
StateId | String ID of the string to load. |
void StrTbl_GetString | ( | uint8_t * | pString, | |
uint16_t | StringId | |||
) |
The function copies the string with the given ID to the given RAM location.
pString | Pointer to a buffer in RAM. Ensure that in the buffer is enough space. | |
StringId | String ID of the string to load. |
void StrTbl_SetLanguage | ( | LanguageIDs_t | LangId | ) |
The function sets the actual string table for this session (not permanently).
LangId | One of the valid language IDs like LANGID_GERMAN or LANGID_ENGLISH for example. |