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

int field_0
eastl::string16* field_4
char16_t* pText
int field_C
bool field_10
bool field_11

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.