Browse Source

[macOS] Fix locale detection.

(cherry picked from commit c8bf0ee062a9be0033da18ff87eee62bef03ada5)
bruvzg 5 years ago
parent
commit
56f5502402
1 changed files with 1 additions and 1 deletions
  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];
 }