diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-07-25 23:42:11 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2020-08-11 13:19:19 +0300 |
commit | f797e1c0782a477cc8c0e9997aa5add6172ea9a0 (patch) | |
tree | c2d7271837d957ba84e29616ef65b8920c98665b /platform/osx | |
parent | f2d6a4bf84c2a5c11a5bebd7ebc09f0c7fdfd9f0 (diff) |
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.
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/os_osx.mm | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |