• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 AddLangString(UString &s, UInt32 langID);
29 void LangString(UInt32 langID, UString &dest);
30 void LangString_OnlyFromLangFile(UInt32 langID, UString &dest);
31 
32 #else
33 
LangString(UInt32 langID)34 inline UString LangString(UInt32 langID) { return NWindows::MyLoadString(langID); }
LangString(UInt32 langID,UString & dest)35 inline void LangString(UInt32 langID, UString &dest) { NWindows::MyLoadString(langID, dest); }
AddLangString(UString & s,UInt32 langID)36 inline void AddLangString(UString &s, UInt32 langID) { s += NWindows::MyLoadString(langID); }
37 
38 #endif
39 
40 #endif
41