mirror of https://github.com/OpenVPN/openvpn-gui
Merge pull request #298 from selvanair/default-sublang
Fallback to default sublanguage when loading resourcespull/304/head
commit
3c01d8eab3
|
@ -53,6 +53,12 @@ FindResourceLang(PTSTR resType, PTSTR resId, LANGID langId)
|
|||
if (res)
|
||||
return res;
|
||||
|
||||
/* try to find the resource in the default sublanguage */
|
||||
LANGID defLangId = MAKELANGID(PRIMARYLANGID(langId), SUBLANG_DEFAULT);
|
||||
res = FindResourceEx(o.hInstance, resType, resId, defLangId);
|
||||
if (res)
|
||||
return res;
|
||||
|
||||
/* try to find the resource in the default language */
|
||||
res = FindResourceEx(o.hInstance, resType, resId, fallbackLangId);
|
||||
if (res)
|
||||
|
|
Loading…
Reference in New Issue