13#include "../strings_type.h"
16 enum ParamType : uint8_t {
27 StringParam(ParamType type, uint8_t consumes,
const char *cmd) : type(type), consumes(consumes), cmd(cmd) {}
29using StringParams = std::vector<StringParam>;
30using StringParamsList = std::vector<StringParams>;
48 bool IsValid()
const {
return !this->language.empty(); }
A sort-of mixin that adds 'at(pos)' and 'operator[](pos)' implementations for 'ConvertibleThroughBase...
void RegisterGameTranslation(class Squirrel *engine)
Register the current translation to the Squirrel engine.
const std::string & GetGameStringName(StringIndexInTab id)
Get the name of a particular game string.
const StringParams & GetGameStringParams(StringIndexInTab id)
Get the string parameters of a particular game string.
void ReconsiderGameScriptLanguage()
Reconsider the game script language, so we use the right one.
const char * GetGameStringPtr(StringIndexInTab id)
Get the string pointer of a particular game string.
Container for all the game strings.
ReferenceThroughBaseContainer< StringList > string_names
The names of the compiled 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.
ReferenceThroughBaseContainer< StringParamsList > string_params
The parameters for the strings.
void Compile()
Compile the language.
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.
ReferenceThroughBaseContainer< StringList > lines
The lines of the file to pass into the parser/encoder.
Templated helper to make a type-safe 'typedef' representing a single POD value.