- Notifications
You must be signed in to change notification settings - Fork478
Commitbb11f04
committed
fix: prioritize enviornment variables over Intl.DateTimeFormat
While `Intl.DateTimeFormat` should be the most reliable way to get theuser's locale, it lacks flexibility.For example, on Windows PowerShell, there's no way to change thedetection result in-session (you have to logout and login again).So in order to provide an escape hatch for developers and users whowant to temporarily change the locale, we prioritize environmentvariables over `Intl.DateTimeFormat`.In POSIX shells, you can do `LANG=zh_CN.UTF-8` to change the locale toChinese;In CMD, it's `set LANG=zh_CN.UTF-8`;In PowerShell, it's `$env:LANG = 'zh_CN.UTF-8'`.Closes#3691 parent6665f0e commitbb11f04
1 file changed
+1
-2
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
49 | 48 |
| |
50 | 49 |
| |
51 | 50 |
| |
52 |
| - | |
| 51 | + | |
53 | 52 |
| |
54 | 53 |
| |
55 | 54 |
| |
|
0 commit comments
Comments
(0)