34#include <NDEVR/String.h>
35#include <NDEVR/INIFactory.h>
36#include <NDEVR/File.h>
37#include <NDEVR/Dictionary.h>
38#include <NDEVR/INIInterface.h>
60 const String&
id()
const {
return m_translation_id; }
90 #define _t(english_string) (TranslatedString(Translator::DefaultLabel(english_string), english_string))
92 #define _tn(number_string, add_comma, min_decimals, max_decimals, min_digits) (Translator::MainTranslator()->convertNumber(number_string, add_comma, min_decimals, max_decimals, min_digits))
94 #define _td(def, english_string) (TranslatedString(Translator::DefaultLabel(def), english_string))
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:68
Contains methods for easily reading and writing to an INI file including.
Definition INIInterface.h:45
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
The core String class for the NDEVR API.
Definition String.h:69
Contains logic for translating a string into a defined language.
Definition Translator.h:45
void setID(const String &id)
Translator(const String &translation_id)
File activeTranslatorFile() const
static void SetMainTranslator(Translator *translator)
void copyTranslationsFrom(const Translator &trans)
INIFactory & translationINI() const
void getINI(INIFactory &factory) override
bool m_has_loaded_language
Definition Translator.h:82
Translator & operator=(const Translator &translation)
bool isLeftToRight() const
String m_translation_id
Definition Translator.h:81
Translator(const Translator &translator)
Dictionary< String, String > translatedStrings() const
File m_translation_file
Definition Translator.h:78
virtual String convertNumber(const String &number_string, bool add_comma, uint04 min_decimals, uint04 max_decimals, uint04 min_digits) const
INIFactory m_language_ini
Definition Translator.h:77
File translatorFile(bool user_file) const
const String & id() const
Definition Translator.h:60
char m_decimal_sep
Definition Translator.h:84
bool m_left_to_right
Definition Translator.h:85
String m_language_name
Definition Translator.h:79
void setName(const String &name)
virtual String convertText(const String &text_string, const String &default_text) const
static String DefaultLabel(const String &text_string)
static Resource< Translator * > main_translator
Definition Translator.h:87
String m_common_characters
Definition Translator.h:80
void copyFrom(const Translator &trans, bool use_existing_ini_file)
void saveTranslation(File location=File())
static Translator * MainTranslator()
char m_number_sep
Definition Translator.h:83
virtual String convertText(const String &text_string) const
const String & name() const
Definition Translator.h:61
String commonCharacters() const
void ensureLanguageLoaded() const
Translator(const File &settings_file)
static Dictionary< String, Translator > GetAvailableTranslations(File folder=File())
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96