forked from BoyC/GW2TacO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Language.h
36 lines (26 loc) · 895 Bytes
/
Language.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
#pragma once
#include "Bedrock/WhiteBoard/WhiteBoard.h"
class Language
{
public:
CString name;
CDictionary<CString, CString> dict;
};
class Localization
{
static int activeLanguageIdx;
static CArray< Language > languages;
static void ImportFile( const CString& file );
static void ImportLanguage( CXMLDocument& d );
static CArray<int> usedGlyphs;
public:
static void SetActiveLanguage( const CString& language );
static CStringArray GetLanguages();
static void Import();
static CString Localize( const char* token, const CString& fallback = CString( "" ) );
static CString Localize( const CString& token, const CString& fallback = CString( "" ) );
static int GetActiveLanguageIndex();
static CArray<int>& GetUsedGlyphs();
static void ProcessStringForUsedGlyphs( CString& string );
};
#define DICT( token, ... ) Localization::Localize( token, __VA_ARGS__ )