forked from Blup1980/microsip_42
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlangpack.h
48 lines (39 loc) · 988 Bytes
/
langpack.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
46
47
48
#pragma once
#include "const.h"
#if defined( UNICODE ) && !defined( _UNICODE )
#define _UNICODE
#endif
#define SIZEOF(X) (sizeof(X)/sizeof(X[0]))
struct LangPackEntry {
unsigned linePos;
DWORD englishHash;
char *english; //not currently used, the hash does everything
char *local;
wchar_t *wlocal;
};
struct LangPackStruct {
TCHAR filename[MAX_PATH];
char language[64];
char lastModifiedUsing[64];
char authors[256];
char authorEmail[128];
bool rtl;
struct LangPackEntry *entry;
int entryCount;
LCID localeID;
UINT defaultANSICp;
};
extern LangPackStruct langPack;
void LoadLangPackModule(void);
void UnloadLangPackModule(void);
int TranslateDialog(HWND hwndDlg);
void TranslateMenu(HMENU hmenu);
char* LangPackTranslateString(const char *szEnglish, const int W);
__inline LPTSTR Translate(LPTSTR source)
{
#ifdef _UNICODE
return ( LPTSTR )LangPackTranslateString( (char*)source, 1 );
#else
return ( LPTSTR )LangPackTranslateString( source, 0 );
#endif
}