31 #ifndef LIBHOMEGEAR_BASE_SRC_MANAGERS_TRANSLATIONMANAGER_H_ 32 #define LIBHOMEGEAR_BASE_SRC_MANAGERS_TRANSLATIONMANAGER_H_ 34 #include "../HelperFunctions/HelperFunctions.h" 35 #include "../HelperFunctions/Io.h" 49 static void load(
const std::string &filepath);
59 static std::string
getTranslation(
const std::string &key,
const std::string &language,
const std::list<std::string> &variables = std::list<std::string>());
70 static std::mutex _translationsMutex;
71 static std::unordered_map<std::string, std::unordered_map<std::string, std::string>> _translations;
76 #endif //LIBHOMEGEAR_BASE_SRC_MANAGERS_TRANSLATIONMANAGER_H_ Definition: TranslationManager.h:39
static std::string getTranslation(const std::string &key, const std::string &language, const std::list< std::string > &variables=std::list< std::string >())
Returns a translation from one of the global translation files.
Definition: TranslationManager.cpp:69
Definition: BaseLib.cpp:34
TranslationManager()=delete
static BaseLib::PVariable getTranslations(const std::string &key, const std::list< std::string > &variables=std::list< std::string >())
Returns all available translations for a key as a Struct.
Definition: TranslationManager.cpp:99
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
static void load(const std::string &filepath)
Loads a translation file.
Definition: TranslationManager.cpp:39