]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - Ventoy2Disk/Ventoy2Disk/Language.h
01eddd666bb7d422cef05543d687eb55625e3e85
[Ventoy.git] / Ventoy2Disk / Ventoy2Disk / Language.h
1 /******************************************************************************
2 * Language.h
3 *
4 * Copyright (c) 2020, longpanda <admin@ventoy.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef __LANGUAGE_H__
22 #define __LANGUAGE_H__
23
24
25 typedef enum STR_ID
26 {
27 STR_ERROR = 0,
28 STR_WARNING, // 1
29 STR_INFO, // 2
30 STR_INCORRECT_DIR, //3
31 STR_INCORRECT_TREE_DIR, //4
32
33 STR_DEVICE, //5
34 STR_LOCAL_VER, //6
35 STR_DISK_VER, //7
36 STR_STATUS, //8
37 STR_INSTALL, //9
38 STR_UPDATE, //10
39
40 STR_UPDATE_TIP, //11
41 STR_INSTALL_TIP, //12
42 STR_INSTALL_TIP2,//13
43
44 STR_INSTALL_SUCCESS,//14
45 STR_INSTALL_FAILED,//15
46 STR_UPDATE_SUCCESS,//16
47 STR_UPDATE_FAILED,//17
48
49 STR_WAIT_PROCESS,//18
50
51 STR_MENU_OPTION,//19
52 STR_MENU_SECURE_BOOT,//20
53
54 STR_ID_MAX
55 }STR_ID;
56
57 extern BOOL g_SecureBoot;
58
59 #define VTOY_MENU_SECURE_BOOT 0xA000
60 #define VTOY_MENU_LANGUAGE_BEGIN 0xB000
61
62
63 #define VENTOY_LANGUAGE_INI TEXT(".\\ventoy\\languages.ini")
64 #define VENTOY_CFG_INI TEXT(".\\Ventoy2Disk.ini")
65 #define VENTOY_MAX_LANGUAGE 200
66
67 #define GET_INI_STRING(Key, Buf) GetPrivateProfileString(Language, Key, TEXT("#"), Buf, sizeof(Buf), VENTOY_LANGUAGE_INI)
68
69 typedef struct VENTOY_LANGUAGE
70 {
71 WCHAR Name[64];
72 WCHAR FontFamily[64];
73 int FontSize;
74
75 WCHAR StrId[STR_ID_MAX][64];
76 WCHAR MsgString[STR_ID_MAX][1024];
77
78 }VENTOY_LANGUAGE;
79
80 extern VENTOY_LANGUAGE *g_cur_lang_data;
81
82 const TCHAR * GetString(enum STR_ID ID);
83
84 #define _G(a) GetString(a)
85
86 #endif