-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
/
LocalizeStrings.h
41 lines (36 loc) · 1 KB
/
LocalizeStrings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*!
\file LocalizeStrings.h
\brief
*/
#ifndef GUILIB_LOCALIZESTRINGS_H
#define GUILIB_LOCALIZESTRINGS_H
#pragma once
#include <map>
/*!
\ingroup strings
\brief
*/
class CLocalizeStrings
{
public:
CLocalizeStrings(void);
virtual ~CLocalizeStrings(void);
bool Load(const CStdString& strFileName, const CStdString& strFallbackFileName="Q:\\language\\english\\strings.xml");
bool LoadSkinStrings(const CStdString& path, const CStdString& fallbackPath);
void ClearSkinStrings();
const CStdString& Get(DWORD dwCode) const;
void Clear();
protected:
bool LoadXML(const CStdString &filename, CStdString &encoding, CStdString &error);
CStdString ToUTF8(const CStdString &encoding, const CStdString &str);
std::map<DWORD, CStdString> m_strings;
typedef std::map<DWORD, CStdString>::const_iterator ciStrings;
typedef std::map<DWORD, CStdString>::iterator iStrings;
};
/*!
\ingroup strings
\brief
*/
extern CLocalizeStrings g_localizeStrings;
extern CLocalizeStrings g_localizeStringsTemp;
#endif