3#ifndef GAME_LOCALIZATION_H
4#define GAME_LOCALIZATION_H
17 CLanguage(
const char *pName,
const char *pFileName,
int Code,
const std::vector<std::string> &vLanguageCodes) :
38 CString(
unsigned Hash,
unsigned ContextHash,
const char *pReplacement) :
59 void AddString(
const char *pOrgStr,
const char *pNewStr,
const char *pContext);
60 const char *
FindString(
unsigned Hash,
unsigned ContextHash)
const;
65extern const char *
Localize(
const char *pStr,
const char *pContext =
"")
Definition: localization.h:14
bool operator<(const CLanguage &Other) const
Definition: localization.h:25
std::string m_Name
Definition: localization.h:20
std::string m_FileName
Definition: localization.h:21
int m_CountryCode
Definition: localization.h:22
std::vector< std::string > m_vLanguageCodes
Definition: localization.h:23
CLanguage(const char *pName, const char *pFileName, int Code, const std::vector< std::string > &vLanguageCodes)
Definition: localization.h:17
Definition: localization.h:31
CString(unsigned Hash, unsigned ContextHash, const char *pReplacement)
Definition: localization.h:38
CString()
Definition: localization.h:37
const char * m_pReplacement
Definition: localization.h:35
unsigned m_ContextHash
Definition: localization.h:34
bool operator<(const CString &Other) const
Definition: localization.h:43
bool operator<=(const CString &Other) const
Definition: localization.h:44
bool operator==(const CString &Other) const
Definition: localization.h:45
unsigned m_Hash
Definition: localization.h:33
Definition: localization.h:29
const char * FindString(unsigned Hash, unsigned ContextHash) const
Definition: localization.cpp:245
void SelectDefaultLanguage(class IConsole *pConsole, char *pFilename, size_t Length) const
Definition: localization.cpp:107
CHeap m_StringsHeap
Definition: localization.h:50
void LoadIndexfile(class IStorage *pStorage, class IConsole *pConsole)
Definition: localization.cpp:18
void AddString(const char *pOrgStr, const char *pNewStr, const char *pContext)
Definition: localization.cpp:240
const std::vector< CLanguage > & Languages() const
Definition: localization.h:54
std::vector< CString > m_vStrings
Definition: localization.h:49
std::vector< CLanguage > m_vLanguages
Definition: localization.h:48
bool Load(const char *pFilename, class IStorage *pStorage, class IConsole *pConsole)
Definition: localization.cpp:166
const char * Localize(const char *pStr, const char *pContext="") GNUC_ATTRIBUTE((format_arg(1)))
Definition: localization.cpp:12
CLocalizationDatabase g_Localization
Definition: localization.cpp:268
#define GNUC_ATTRIBUTE(x)
Definition: log.h:10