mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: System language detection under macOS (fixes #1560)
(cherry picked from commit cde5faedf4)
This commit is contained in:
parent
c8f17e36ad
commit
79078c40cb
1 changed files with 2 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ uses
|
|||
{$IF DEFINED(UNIX)}
|
||||
iconvenc_dyn, LazUTF8
|
||||
{$IF DEFINED(DARWIN)}
|
||||
, MacOSAll, CocoaAll
|
||||
, MacOSAll, CocoaAll, StrUtils
|
||||
{$ELSE}
|
||||
, UnixCP
|
||||
{$ENDIF}
|
||||
|
|
@ -379,6 +379,7 @@ begin
|
|||
begin
|
||||
// Crop to terminating zero
|
||||
SystemLanguage:= PAnsiChar(SystemLanguage);
|
||||
SystemLanguage:= Copy2Symb(SystemLanguage, '-');
|
||||
// Get system country
|
||||
CurrentLocale:= NSLocale.currentLocale();
|
||||
Country:= NSString(CurrentLocale.objectForKey(NSLocaleCountryCode)).UTF8String;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue