1 #ifndef LOCALE_MANAGER_HPP 2 #define LOCALE_MANAGER_HPP 5 #include <unordered_map> 21 const std::string& key);
32 const std::string& locale);
38 std::unordered_map<std::string, std::string>
strings_;
This class manages the localization of our game as a singleton.
Definition: LocaleManager.hpp:11
LocaleManager(const LocaleManager &)=delete
Stop the compiler from generating methods to copy the object.
LocaleManager & operator=(const LocaleManager &)=delete
Stop the compiler from generating methods to copy the object.
static std::string Lookup(const std::string &key)
Looks up the given key in the translation map.
Definition: LocaleManager.cpp:14
~LocaleManager()
Destructs a LocaleManager.
Definition: LocaleManager.cpp:12
std::unordered_map< std::string, std::string > strings_
The translation key map.
Definition: LocaleManager.hpp:38
static LocaleManager & instance()
The singleton instance of the LocaleManager.
Definition: LocaleManager.cpp:5