Fixed failed system language detection for de, fr, nl, es, it, pt in case locale is != xx_XX, for example it failed for de_AT

This commit is contained in:
heckflosse
2018-03-02 19:37:08 +01:00
parent 34807dc7a9
commit 6c5696a976

View File

@@ -20,7 +20,6 @@
#include <fstream> #include <fstream>
#include <glib.h> #include <glib.h>
#ifdef WIN32 #ifdef WIN32
#include <windows.h> #include <windows.h>
#include <winnls.h> #include <winnls.h>
@@ -93,7 +92,7 @@ struct LocaleToLang : private std::map<std::pair<Glib::ustring, Glib::ustring>,
} }
// Look for matching language only. // Look for matching language only.
iterator = find (key (major)); iterator = find (key (major, major.uppercase()));
if (iterator != end ()) { if (iterator != end ()) {
return iterator->second; return iterator->second;