18 using StringMap = std::map<std::string, std::string, std::less<>>;
20 Resource(std::string_view name, std::string_view langCode) :
25 std::string_view
GetName()
const {
return m_name; }
30 Uint32
GetNumStrings()
const {
return static_cast<Uint32
>(m_strings.size()); }
32 const std::string &
Get(std::string_view token)
const;
41 std::string m_langCode;
49#define DECLARE_STRING(x) extern char x[];
56 Resource &
GetResource(std::string_view name, std::string_view langCode);
IterationProxy< Container > MakeIterationProxy(Container &container)
Definition: IterationProxy.h:51
Definition: IterationProxy.h:13
std::string_view GetLangCode() const
Definition: Lang.h:26
const IterationProxy< const StringMap > GetStrings() const
Definition: Lang.h:37
Uint32 GetNumStrings() const
Definition: Lang.h:30
std::map< std::string, std::string, std::less<> > StringMap
Definition: Lang.h:18
bool Load()
Definition: Lang.cpp:36
Resource(std::string_view name, std::string_view langCode)
Definition: Lang.h:20
IterationProxy< StringMap > GetStrings()
Definition: Lang.h:36
static std::vector< std::string > GetAvailableLanguages(std::string_view resourceName)
Definition: Lang.cpp:117
const std::string & Get(std::string_view token) const
Definition: Lang.cpp:108
std::string_view GetName() const
Definition: Lang.h:25
Resource & GetResource(std::string_view name, std::string_view langCode)
Definition: Lang.cpp:209
void MakeCore(Resource &res)
Definition: Lang.cpp:174
const Resource & GetCore()
Definition: Lang.cpp:202