API Documentation
Loading...
Searching...
No Matches
Translator Class Reference

#include <Translator.h>

Inheritance diagram for Translator:
[legend]
Collaboration diagram for Translator:
[legend]

Public Member Functions

 Translator ()
 
 Translator (const String &translation_id)
 
 Translator (const File &settings_file)
 
 Translator (const Translator &translator)
 
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)
 
File translatorFile (bool user_file) const
 
void getINI (INIFactory &factory) override
 
INIFactorytranslationINI () const
 
const Stringid () const
 
const Stringname () const
 
void setID (const String &id)
 
bool isLeftToRight () const
 
void setName (const String &name)
 
Translatoroperator= (const Translator &translation)
 
String commonCharacters () const
 
void saveTranslation (File location=File())
 
File activeTranslatorFile () const
 
Dictionary< String, StringtranslatedStrings () const
 
- Public Member Functions inherited from INIInterface
 INIInterface (const File &default_ini)
 
virtual ~INIInterface ()
 
virtual void writeToLog (ProgressInfo *log, uint01 log_level=2U)
 
virtual void writeToLog (const String &title, ProgressInfo *log, uint01 log_level=2U)
 
void setDefaultINIFile (const File &file)
 
virtual bool readINIOptions ()
 
virtual bool readINIOptions (File &ini_file)
 
virtual void finishReadingINI (INIFactory &)
 
virtual void prepareForINI (INIFactory &)
 
virtual bool saveINIOptions (bool multithead=false)
 
virtual bool saveINIOptions (File &ini_file, bool multithead=false)
 

Static Public Member Functions

static Dictionary< String, TranslatorGetAvailableTranslations (File folder=File())
 
static TranslatorMainTranslator ()
 
static void SetMainTranslator (Translator *translator)
 
static String DefaultLabel (const String &text_string)
 

Static Public Attributes

static Resource< Translator * > main_translator
 

Protected Member Functions

void ensureLanguageLoaded () const
 
void init ()
 

Protected Attributes

INIFactory m_language_ini
 
File m_translation_file
 
String m_language_name
 
String m_common_characters
 
String m_translation_id
 
bool m_has_loaded_language
 
char m_number_sep
 
char m_decimal_sep
 
bool m_left_to_right
 
- Protected Attributes inherited from INIInterface
File m_default_ini
 

Constructor & Destructor Documentation

◆ Translator() [1/4]

◆ Translator() [2/4]

Translator ( const String & translation_id)

◆ Translator() [3/4]

Translator ( const File & settings_file)

◆ Translator() [4/4]

Translator ( const Translator & translator)

Member Function Documentation

◆ activeTranslatorFile()

File activeTranslatorFile ( ) const

◆ commonCharacters()

String commonCharacters ( ) const

◆ convertNumber()

String convertNumber ( const String & number_string,
bool add_comma,
uint04 min_decimals,
uint04 max_decimals,
uint04 min_digits ) const
virtual

◆ convertText() [1/2]

String convertText ( const String & text_string) const
virtual

◆ convertText() [2/2]

String convertText ( const String & text_string,
const String & default_text ) const
virtual

◆ copyFrom()

void copyFrom ( const Translator & trans,
bool use_existing_ini_file )

◆ copyTranslationsFrom()

void copyTranslationsFrom ( const Translator & trans)

◆ DefaultLabel()

String DefaultLabel ( const String & text_string)
static

◆ ensureLanguageLoaded()

void ensureLanguageLoaded ( ) const
protected

◆ GetAvailableTranslations()

Dictionary< String, Translator > GetAvailableTranslations ( File folder = File())
static

◆ getINI()

void getINI ( INIFactory & factory)
overridevirtual

Implements INIInterface.

◆ id()

const String & id ( ) const
inline

◆ init()

void init ( )
protected

◆ isLeftToRight()

bool isLeftToRight ( ) const

◆ MainTranslator()

Translator * MainTranslator ( )
static

◆ name()

const String & name ( ) const
inline

◆ operator=()

Translator & operator= ( const Translator & translation)

◆ saveTranslation()

void saveTranslation ( File location = File())

◆ setID()

void setID ( const String & id)

◆ SetMainTranslator()

void SetMainTranslator ( Translator * translator)
static

◆ setName()

void setName ( const String & name)

◆ translatedStrings()

Dictionary< String, String > translatedStrings ( ) const

◆ translationINI()

INIFactory & translationINI ( ) const

◆ translatorFile()

File translatorFile ( bool user_file) const

Member Data Documentation

◆ m_common_characters

String m_common_characters
protected

◆ m_decimal_sep

char m_decimal_sep
protected

◆ m_has_loaded_language

bool m_has_loaded_language
mutableprotected

◆ m_language_ini

INIFactory m_language_ini
mutableprotected

◆ m_language_name

String m_language_name
protected

◆ m_left_to_right

bool m_left_to_right
protected

◆ m_number_sep

char m_number_sep
protected

◆ m_translation_file

File m_translation_file
protected

◆ m_translation_id

String m_translation_id
protected

◆ main_translator

Resource< Translator * > main_translator
static

The documentation for this class was generated from the following files: