1 // LangUtils.h
2
3 #ifndef __LANG_UTILS_H
4 #define __LANG_UTILS_H
5
6 #include "../../../Windows/ResourceString.h"
7
8 #ifdef LANG
9
10 extern UString g_LangID;
11
12 struct CIDLangPair
13 {
14 UInt32 ControlID;
15 UInt32 LangID;
16 };
17
18 void ReloadLang();
19 void LoadLangOneTime();
20 FString GetLangDirPrefix();
21
22 void LangSetDlgItemText(HWND dialog, UInt32 controlID, UInt32 langID);
23 void LangSetDlgItems(HWND dialog, const UInt32 *ids, unsigned numItems);
24 void LangSetDlgItems_Colon(HWND dialog, const UInt32 *ids, unsigned numItems);
25 void LangSetWindowText(HWND window, UInt32 langID);
26
27 UString LangString(UInt32 langID);
28 void LangString(UInt32 langID, UString &dest);
29 void LangString_OnlyFromLangFile(UInt32 langID, UString &dest);
30
31 #else
32
LangString(UInt32 langID)33 inline UString LangString(UInt32 langID) { return NWindows::MyLoadString(langID); }
LangString(UInt32 langID,UString & dest)34 inline void LangString(UInt32 langID, UString &dest) { NWindows::MyLoadString(langID, dest); }
35
36 #endif
37
38 #endif
39