-
Notifications
You must be signed in to change notification settings - Fork 8
/
localization.h
45 lines (36 loc) · 949 Bytes
/
localization.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
42
43
44
45
#ifndef _LOCALIZATION_H_
#define _LOCALIZATION_H_
#include "Object.h"
#include "SafeProgramming.h"
#include "Misc.h"
#include "String.h"
#include "Platform.h"
#include "Preferences.h"
// ----
#define MAX_LOCALIZED_STRINGS 128
class CLocalization : public CObject
{
public:
// ----
CLocalization( CPlatform *_PlatformRef,
CPreferences *_PreferencesRef);
~CLocalization();
// ----
// Load localization strings - the language will be
// read from the preferences object (defaulting to
// English if this fails).
bool LoadLocalizationStrings();
// ----
// Free memory
void FreeLocalizationStrings();
// ----
// Obtain a pointer to a string resource.
// The return value will be NULL if the requested
// resource does not exists or is out of bounds.
CString* GetString(int _Index);
protected:
CPlatform *PlatformRef;
CPreferences *PreferencesRef;
CString *StringLocalizationArray[MAX_LOCALIZED_STRINGS];
};
#endif