59 const char*
get(
U64 key,
bool appendSection,
const char* defaultValue );
88const
char*
Get(
U64 key,
bool appendSection = true, const
char* defaultValue =
nullptr);
91#define LOCALE_STR(X) Locale::Get(_ID(X))
void setChangeLanguageCallback(const DELEGATE< void, std::string_view > &cbk)
LangCallback _languageChangeCallback
ErrorCode changeLanguage(std::string_view newLanguage)
hashMap< U64, LanguageEntry > _languageTable
const char * get(U64 key, bool appendSection, const char *defaultValue)
DELEGATE< void, std::string_view > LangCallback
ErrorCode ChangeLanguage(const char *newLanguage)
const char * Get(U64 key, bool appendSection=true, const char *defaultValue=nullptr)
void SetChangeLanguageCallback(const DELEGATE< void, std::string_view > &cbk)
Set a function to be called on each language change.
constexpr const char *const g_languageFileExtension
const Str< 64 > & CurrentLanguage() noexcept
Query the current language code to detect changes.
ErrorCode Init(const char *newLanguage=DEFAULT_LANG)
Reset everything and load the specified language file.
void Clear() noexcept
clear the language table
constexpr const char * DEFAULT_LANG
void Idle()
perform maintenance tasks
Handle console commands that start with a forward slash.
DELEGATE_STD< Ret, Args... > DELEGATE
hashAlg::unordered_map< K, V, HashFun, Predicate > hashMap