diff options
| author | Daniel MartÃn | 2021-10-23 14:44:31 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-10-31 13:33:55 +0200 |
| commit | 5e05be566b0e13ce0b4e75da663fb051039f0751 (patch) | |
| tree | 95667ebb72be66d1db1c5fd64262e1243867147b /src | |
| parent | 335a660b4b725eb76abfa5d80295ac5c7be5d205 (diff) | |
| download | emacs-5e05be566b0e13ce0b4e75da663fb051039f0751.tar.gz emacs-5e05be566b0e13ce0b4e75da663fb051039f0751.zip | |
Fix localized display of date and time in the NS port
* src/nsterm.m (ns_init_locale): If not already set, set LC_ALL to the
current locale ID so that dates, currencies, etc. use the settings
configured in the operating system. (Bug#51321)
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index aa29c13eb22..19ed750d217 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -543,8 +543,10 @@ ns_init_locale (void) | |||
| 543 | NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", | 543 | NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", |
| 544 | [locale localeIdentifier]]; | 544 | [locale localeIdentifier]]; |
| 545 | 545 | ||
| 546 | /* Set LANG to locale, but not if LANG is already set. */ | 546 | /* Set LANG and LC_ALL to locale, but not if the variables are |
| 547 | already set. */ | ||
| 547 | setenv("LANG", [localeID UTF8String], 0); | 548 | setenv("LANG", [localeID UTF8String], 0); |
| 549 | setenv("LC_ALL", [localeID UTF8String], 0); | ||
| 548 | } | 550 | } |
| 549 | @catch (NSException *e) | 551 | @catch (NSException *e) |
| 550 | { | 552 | { |