]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
fixed wxSplitPath() bug and added tests for it
[wxWidgets.git] / src / common / intl.cpp
index 7b9eb1135c2f799018221a4e553436f98312a7af..cba698cb80c678f2eed2ff7cef4a2ce7d673e278 100644 (file)
@@ -678,8 +678,8 @@ bool wxLocale::Init(int language, int flags)
                 buffer[0] = wxT('\0');
                 GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, buffer, 256);
                 locale << buffer;
                 buffer[0] = wxT('\0');
                 GetLocaleInfo(lcid, LOCALE_SENGLANGUAGE, buffer, 256);
                 locale << buffer;
-                buffer[0] = wxT('\0');
-                GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, buffer, 256);
+                if (GetLocaleInfo(lcid, LOCALE_SENGCOUNTRY, buffer, 256) > 0)
+                    locale << wxT("_") << buffer;
             }
             if (locale.IsEmpty())
             {
             }
             if (locale.IsEmpty())
             {