iw4x-client/src/Components/Modules/Localization.hpp
2016-12-21 17:27:45 +01:00

31 lines
892 B
C++

namespace Components
{
class Localization : public Component
{
public:
Localization();
~Localization();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* getName() { return "Localization"; };
#endif
static void Set(std::string key, std::string value);
static const char* Get(const char* key);
static void SetTemp(std::string key, std::string value);
static void ClearTemp();
private:
static std::mutex LocalizeMutex;
static Utils::Memory::Allocator MemAllocator;
static std::unordered_map<std::string, Game::LocalizeEntry*> LocalizeMap;
static std::unordered_map<std::string, Game::LocalizeEntry*> TempLocalizeMap;
static Dvar::Var UseLocalization;
static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish);
static void LoadLanguageStrings();
static void SELoadLanguageStub();
};
}