Platformer
Platformer
|
This class manages the localization of our game as a singleton. More...
#include <LocaleManager.hpp>
Public Member Functions | |
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 Public Member Functions | |
static LocaleManager & | instance () |
The singleton instance of the LocaleManager. | |
static std::string | Lookup (const std::string &key) |
Looks up the given key in the translation map. More... | |
Private Member Functions | |
LocaleManager (const std::string &locale) | |
Constructs a LocaleManager. More... | |
~LocaleManager () | |
Destructs a LocaleManager. | |
Private Attributes | |
std::unordered_map< std::string, std::string > | strings_ |
The translation key map. | |
This class manages the localization of our game as a singleton.
|
private |
Constructs a LocaleManager.
locale | The localization language |
|
static |
Looks up the given key in the translation map.
key | The key to be looked up |