LocalizedString class
This class is used to store a eastl::string16 that is localized; that is, it depends on the current language of the game.
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(const LocalizedString& other)
- ~LocalizedString()
Public functions
- auto operator=(const LocalizedString& other) -> LocalizedString&
-
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. |