SHAPER
9.12.0
|
The definition provides collection and writing of missed translations. More...
Public Types | |
typedef std::map< std::string, std::string > | Dictionary |
A data type of dictionary <KeyString, ResultString> More... | |
typedef std::map< std::string, Dictionary > | Translator |
A data type of Translator with structure <Context, Dictionary> More... | |
Static Public Member Functions | |
static bool | load (const std::string &theFileName) |
Load translations from TS file. More... | |
static std::string | translate (const Events_InfoMessage &theInfo) |
Returns translation from the given info message. More... | |
static std::string | translate (const std::string &theContext, const std::string &theMessage, const std::list< std::string > &theParams=std::list< std::string >()) |
Returns translation from the given data. More... | |
static std::string | codec (const std::string &theContext) |
Returns codec for the context. More... | |
static std::string | codec (const Events_InfoMessage &theInfo) |
Returns codec for the context. More... | |
The definition provides collection and writing of missed translations.
Class for messages translation on different languages. It can load TS files wich contain translation string and provides translations of messages from source code
typedef std::map<std::string, std::string> Config_Translator::Dictionary |
A data type of dictionary <KeyString, ResultString>
typedef std::map<std::string, Dictionary> Config_Translator::Translator |
A data type of Translator with structure <Context, Dictionary>
|
static |
Load translations from TS file.
theFileName | a TS file name with full path |
|
static |
Returns translation from the given info message.
If translation is not exists then it returns a string from the info data without translation
theInfo | an info message |
|
static |
Returns translation from the given data.
If translation is not exists then it returns a string from the info data without translation
theContext | context of the message (Feature Id) |
theMessage | a message which dave to be translated |
theParams | a list of parameters (can be empty) |
|
static |
Returns codec for the context.
theContext | the context |
|
static |
Returns codec for the context.
theInfo | the info |