wavelength 1.0.0
Loading...
Searching...
No Matches
locale.h
Go to the documentation of this file.
1#pragma once
2
3#include "script/dataarray.h"
4
11class Locale {
12public:
20
27 virtual ~Locale();
28
36 void Init(const char *pszLanguage);
37
44 void Terminate();
45
55 const char *Localize(const char *pszToken, bool bFail);
56
59 return mStrings;
60 }
61
63 int GetFileCount() const {
64 return mFileCount;
65 }
66
67private:
68 DataArray *mStrings;
69 int mFileCount;
70};
71
77extern Locale TheLocale;
78
Reference-counted array of script data nodes.
Definition dataarray.h:20
Text of the user interface in the console language.
Definition locale.h:11
Locale()
Construct a locale with no text loaded.
virtual ~Locale()
Release the text through Terminate().
DataArray * GetStrings() const
Definition locale.h:58
const char * Localize(const char *pszToken, bool bFail)
Look up the text of a token in the language Init() loaded.
int GetFileCount() const
Definition locale.h:63
void Init(const char *pszLanguage)
Build the text table of one language from the configuration.
void Terminate()
Release the text table, if one is loaded.
Locale TheLocale
The user interface text.
void LocalePrepare()
Prepare the locale layer while the system starts.