Explorar o código

[macOS] Fix locale detection.

(cherry picked from commit c8bf0ee062a9be0033da18ff87eee62bef03ada5)
bruvzg %!s(int64=5) %!d(string=hai) anos
pai
achega
56f5502402
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      platform/osx/os_osx.mm

+ 1 - 1
platform/osx/os_osx.mm

@@ -2037,7 +2037,7 @@ Error OS_OSX::shell_open(String p_uri) {
 }
 
 String OS_OSX::get_locale() const {
-	NSString *locale_code = [[NSLocale currentLocale] localeIdentifier];
+	NSString *locale_code = [[NSLocale preferredLanguages] objectAtIndex:0];
 	return [locale_code UTF8String];
 }