ferencd@0: #ifndef DICTIONARY_H ferencd@0: #define DICTIONARY_H ferencd@0: ferencd@0: #include ferencd@0: #include ferencd@0: #include ferencd@0: ferencd@0: class dictionary ferencd@0: { ferencd@0: public: ferencd@0: static std::string translate(const std::string& what, const std::string& target_language, bool other_languages_too, std::map& translations); ferencd@0: static std::string translate(const std::string& what, const std::string& target_language); ferencd@0: ferencd@0: static void add_translation(const std::string& key, const std::string& language, const std::string& translated); ferencd@0: ferencd@0: static const std::vector supported_languages; ferencd@0: ferencd@0: // contains the translations generated from external files (such as recipes) ferencd@0: // the outer key is the identifier of the text that is to be translated (such as: chicken_soup_desc) ferencd@0: // and the internal keys are the languages, mapped to the given translation ferencd@0: static std::map> m_inMemoryTranslations; ferencd@0: }; ferencd@0: ferencd@0: #endif // DICTIONARY_H