25 StringParam(ParamType type, uint8_t consumes,
const char *cmd) : type(type), consumes(consumes), cmd(cmd) {}
27using StringParams = std::vector<StringParam>;
28using StringParamsList = std::vector<StringParams>;
46 bool IsValid()
const {
return !this->language.empty(); }
const std::string & GetGameStringName(uint id)
Get the name of a particular game string.
void RegisterGameTranslation(class Squirrel *engine)
Register the current translation to the Squirrel engine.
void ReconsiderGameScriptLanguage()
Reconsider the game script language, so we use the right one.
const char * GetGameStringPtr(uint id)
Get the string pointer of a particular game string.
const StringParams & GetGameStringParams(uint id)
Get the string parameters of a particular game string.
std::vector< std::string > StringList
Type for a list of strings.
Container for all the game strings.
std::vector< LanguageStrings > raw_strings
The raw strings per language, first must be English/the master language!.
std::vector< LanguageStrings > compiled_strings
The compiled strings per language, first must be English/the master language!.
uint version
The version of the language strings.
StringList string_names
The names of the compiled strings.
void Compile()
Compile the language.
StringParamsList string_params
The parameters for the strings.
LanguageStrings * cur_language
The current (compiled) language.
Container for the raw (unencoded) language strings of a language.
std::string language
Name of the language (base filename). Empty string if invalid.
StringList lines
The lines of the file to pass into the parser/encoder.