LocalizedString class
#include <Spore/LocalizedString.h>
This class is used to store a eastl::string16 that is localized; that is, it depends on the current language of the game.
Contents
LocalizedStrings store a tableID and instanceID which are used to get the appropiate text depending on the current language. The texts are searched inside the locale~ folder. The tableID is the name of the file, and the instanceID is the ID of that text inside that file.
Constructors, destructors, conversion operators
- LocalizedString()
- LocalizedString(uint32_t tableID, uint32_t instanceID, const char16_t* pText = nullptr)
- ~LocalizedString()
Public functions
- auto GetText() const -> const char16_t*
- Gets the text that corresponds to this object according to the current locale.
- auto SetText(uint32_t tableID, uint32_t instanceID, const char16_t* pPlaceholderText = nullptr) -> bool
- Sets the tableID and instanceID that are used to get the text depending on the current language.
Protected variables
Function documentation
bool LocalizedString:: SetText(uint32_t tableID,
uint32_t instanceID,
const char16_t* pPlaceholderText = nullptr)
Sets the tableID and instanceID that are used to get the text depending on the current language.
Parameters | |
---|---|
tableID | The ID of the .locale file that contains the text. |
instanceID | The ID that identifies this particular eastl::string inside the locale table. |
pPlaceholderText | [Optional] A placeholder text, ignored. |