113 void setLocalisation(
const std::string& localisation);
121 {
return this->localisedEntry_; }
128 {
return this->fallbackEntry_; }
135 { this->label_ = label; }
142 {
return this->label_; }
177 void readDefaultLanguageFile();
178 bool readTranslatedLanguageFile(
const std::string& language);
179 void writeDefaultLanguageFile()
const;
The LanguageEntry class stores the default- and the translated string of a given entry in the languag...
Definition: Language.h:109
std::string defaultLanguage_
The default language.
Definition: Language.h:183
void AddLanguageEntry(const LanguageEntryLabel &label, const std::string &fallbackString)
Shortcut function for Language::addEntry.
Definition: Language.h:191
std::string fallbackEntry_
The default entry: Used, if no translation is available or no language configured.
Definition: Language.h:146
const LanguageEntryLabel & getLabel() const
Returns the label of this entry.
Definition: Language.h:141
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
void addEntry(const LanguageEntryLabel &label, const std::string &entry)
Adds a new LanguageEntry, if it's not already existing.
Definition: Language.cc:141
std::string localisedEntry_
The localised entry in the configured language.
Definition: Language.h:147
const std::string & getDefault()
Returns the default entry.
Definition: Language.h:127
The Language class manges the language files and entries and stores the LanguageEntry objects in a ma...
Definition: Language.h:160
Definition: CoreConfig.h:38
const std::string & getLocalisation()
Returns the localised entry in the configured language.
Definition: Language.h:120
std::string defaultLocalisation_
The returned string, if an entry unavailable entry is requested.
Definition: Language.h:184
void setLabel(const LanguageEntryLabel &label)
Sets the label of this entry.
Definition: Language.h:134
std::map< std::string, LanguageEntry * > languageEntries_
A map to store all LanguageEntry objects and their labels.
Definition: Language.h:185
Base for singleton classes.
Definition: Singleton.h:114
LanguageEntryLabel label_
The label of the entry.
Definition: Language.h:145
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
bool bLocalisationSet_
True if the translation was set.
Definition: Language.h:148
#define _CoreExport
Definition: CorePrereqs.h:61
static Language * singletonPtr_s
Definition: Language.h:187
const std::string & getLocalisation(const LanguageEntryLabel &label, bool bError=true) const
Returns the localisation of a given entry.
Definition: Language.cc:172
Definition of the Singleton template that is used as base class for classes that allow only one insta...
std::string LanguageEntryLabel
Definition: CorePrereqs.h:141
static Language & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
const std::string & GetLocalisation(const LanguageEntryLabel &label)
Shortcut function for Language::getLocalisation.
Definition: Language.h:197
const std::string & GetLocalisation_noerror(const LanguageEntryLabel &label)
Shortcut function for Language::getLocalisation without printing an error in case the label doesn't e...
Definition: Language.h:203