Merge pull request #298 from selvanair/default-sublang

Fallback to default sublanguage when loading resources
pull/304/head
Gert Doering 2019-03-29 20:03:28 +01:00 committed by GitHub
commit 3c01d8eab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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)