From f797e1c0782a477cc8c0e9997aa5add6172ea9a0 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sat, 25 Jul 2020 23:42:11 +0300 Subject: Improve `OS::get_locale()` on macOS and Windows, replace "-" with "_" and use system macros instead of bitwise AND. Add locale format info to the documentation. --- platform/osx/os_osx.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/osx') diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index c4eb5407af..c07e634489 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -284,7 +284,7 @@ Error OS_OSX::shell_open(String p_uri) { String OS_OSX::get_locale() const { NSString *locale_code = [[NSLocale preferredLanguages] objectAtIndex:0]; - return [locale_code UTF8String]; + return String([locale_code UTF8String]).replace("-", "_"); } String OS_OSX::get_executable_path() const { -- cgit v1.2.3