7#ifndef __HDI_CORE_LOCALIZER__
8#define __HDI_CORE_LOCALIZER__
17#define HDI_CORE_LOCALIZER hdi::core::Localizer::instance()
50 typedef std::map<Locale, std::string> StringMap;
88 void addString(
const std::string& key_,
const Locale locale_,
const std::string& str_);
Singleton class to aid in runtime localization.
Definition: hdicoreLocalizer.h:48
void addString(const std::string &key_, const Locale locale_, const std::string &str_)
Adds a new localized string value, keyed by a unique string and the value's locale.
std::string getString(const std::string &key_, const Locale locale_) const
Gets a localized string for a given key and locale.
std::string getLocalString(const std::string &key_) const
Gets a localized string for a given key and whatever locale the app currently has.
StringMap getAllStrings(const std::string &key_) const
Gets a map of locales and their corresponding localized strings for a given key.
static Localizer * instance()
Allows access to the singleton localizer instance object.
void setDefaultLocale(const Locale defaultLocale_)
Sets the default locale of the Localizer instance.
Locale defaultLocale() const
Gets the default locale of the Localizer instance.
void removeString(const std::string &key_, const Locale locale_)
Removes an existing localized string value by its key and locale.
Base plugin class; the heart of any plugin project.
Definition: hdicorePlugin.h:35
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Locale
Indicates the locale under which the app is running. Many languages are only listed for one country,...
Definition: hdicoreTypes.h:851