27 bool Load(std::string_view dirPath);
33 std::string
Get(std::string_view key)
const;
36 std::string
Get(std::string_view key,
int slot)
const;
40 std::string
GetOr(std::string_view key,
int slot, std::string_view fallback)
const;
43 std::string
Get(std::string_view key,
int slot,
const Tokens& tokens)
const;
46 std::string
Get(std::string_view key,
const Tokens& tokens)
const;
61 std::optional<std::string_view> LookupIn(std::string_view lang, std::string_view key)
const;
65 std::optional<std::string_view> Resolve(std::string_view key,
int slot)
const;
71 std::string _activeLang =
"en";
void SetLanguage(std::string_view lang)
std::string_view PlayerLanguage(int slot) const
Translations(PlayerLanguages &languages)
std::string Get(std::string_view key) const
std::vector< std::string > GetAvailableLanguages() const
bool Load(std::string_view dirPath)
void SetPlayerLanguage(int slot, std::string_view lang)
const std::string & GetLanguage() const
std::string GetOr(std::string_view key, int slot, std::string_view fallback) const
std::unordered_map< std::string, Value, StringHash, std::equal_to<> > StringMap
std::map< std::string, std::string > Tokens