#pragma once namespace Components { class Localization : public Component { public: Localization(); ~Localization(); static void Set(const std::string& psLocalReference, const std::string& psNewString); static const char* Get(const char* key); static std::optional PrefixOverride; static void ParseOutput(const std::function& callback); private: static std::recursive_mutex LocalizeMutex; static std::unordered_map LocalizeMap; static Dvar::Var UseLocalization; static std::function ParseCallback; static void __stdcall SetStringStub(const char* psLocalReference, const char* psNewString, int bSentenceIsEnglish); static void SaveParseOutput(Game::LocalizeEntry* asset); static void SetCredits(); static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType); }; }