API Documentation
|
Contains logic for translating a string into a defined language. More...
#include <Translator.h>
Public Member Functions | |
File | activeTranslatorFile () const |
String | commonCharacters () const |
virtual String | convertNumber (const String &number_string, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits) const |
virtual String | convertText (const String &text_string) const |
virtual String | convertText (const String &text_string, const String &default_text) const |
void | copyFrom (const Translator &trans, bool use_existing_ini_file) |
void | copyTranslationsFrom (const Translator &trans) |
void | getINI (INIFactory &factory) override |
const String & | id () const |
bool | isLeftToRight () const |
const String & | name () const |
Translator & | operator= (const Translator &translation) |
void | saveTranslation (File location=File()) |
void | setID (const String &id) |
void | setName (const String &name) |
Dictionary< String, String > | translatedStrings () const |
INIFactory & | translationINI () const |
Translator () | |
Translator (const File &settings_file) | |
Translator (const String &translation_id) | |
Translator (const Translator &translator) | |
File | translatorFile (bool user_file) const |
Public Member Functions inherited from INIInterface | |
virtual void | finishReadingINI (INIFactory &) |
INIInterface (const File &default_ini) | |
virtual void | prepareForINI (INIFactory &) |
virtual bool | readINIOptions () |
virtual bool | readINIOptions (File &ini_file) |
virtual bool | saveINIOptions (bool multithead=false) |
virtual bool | saveINIOptions (File &ini_file, bool multithead=false) |
void | setDefaultINIFile (const File &file) |
virtual void | writeToLog (const String &title, ProgressInfo *log, uint01 log_level=2U) |
virtual void | writeToLog (ProgressInfo *log, uint01 log_level=2U) |
virtual | ~INIInterface () |
Static Public Member Functions | |
static String | DefaultLabel (const String &text_string) |
static Dictionary< String, Translator > | GetAvailableTranslations (File folder=File()) |
static Translator * | MainTranslator () |
static void | SetMainTranslator (Translator *translator) |
Static Public Attributes | |
static Resource< Translator * > | main_translator |
Protected Member Functions | |
void | ensureLanguageLoaded () const |
void | init () |
Protected Attributes | |
String | m_common_characters |
char | m_decimal_sep |
bool | m_has_loaded_language |
INIFactory | m_language_ini |
String | m_language_name |
bool | m_left_to_right |
char | m_number_sep |
File | m_translation_file |
String | m_translation_id |
Protected Attributes inherited from INIInterface | |
File | m_default_ini |
Contains logic for translating a string into a defined language.
Translator | ( | ) |
Translator | ( | const String & | translation_id | ) |
Translator | ( | const File & | settings_file | ) |
Translator | ( | const Translator & | translator | ) |
File activeTranslatorFile | ( | ) | const |
String commonCharacters | ( | ) | const |
|
virtual |
|
virtual |
void copyFrom | ( | const Translator & | trans, |
bool | use_existing_ini_file ) |
void copyTranslationsFrom | ( | const Translator & | trans | ) |
|
protected |
|
static |
|
overridevirtual |
Implements INIInterface.
|
inline |
|
protected |
bool isLeftToRight | ( | ) | const |
|
static |
|
inline |
Translator & operator= | ( | const Translator & | translation | ) |
void setID | ( | const String & | id | ) |
|
static |
void setName | ( | const String & | name | ) |
Dictionary< String, String > translatedStrings | ( | ) | const |
INIFactory & translationINI | ( | ) | const |
File translatorFile | ( | bool | user_file | ) | const |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |