Browse Source

[macOS] Fix locale detection.

bruvzg 5 năm trước cách đây
mục cha
commit
c8bf0ee062
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      platform/osx/os_osx.mm

+ 1 - 1
platform/osx/os_osx.mm

@@ -2224,7 +2224,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];
 }