[KERNEL32]
authorKamil Hornicek <kamil.hornicek@reactos.org>
Fri, 31 Oct 2014 16:32:23 +0000 (16:32 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Fri, 31 Oct 2014 16:32:23 +0000 (16:32 +0000)
- fall back to english if a localized resource is not found in GetLocalisedText
- this prevents debug spam and loss of functionality (see CORE-8720) for languages that don't have kernel32 translated

svn path=/trunk/; revision=65152

reactos/dll/win32/kernel32/winnls/string/nls.c

index 02a5681..7ba816d 100644 (file)
@@ -1704,6 +1704,16 @@ GetLocalisedText(DWORD dwResId, WCHAR *lpszDest)
                             (LPWSTR)RT_STRING,
                             MAKEINTRESOURCEW((dwId >> 4) + 1),
                             langId);
+
+    /* english fallback */
+    if(!hrsrc)
+    {
+        hrsrc = FindResourceExW(hCurrentModule,
+                            (LPWSTR)RT_STRING,
+                            MAKEINTRESOURCEW((dwId >> 4) + 1),
+                            MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
+    }
+
     if (hrsrc)
     {
         HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc);