All
values in this key are
REG_SZ. A value-name's prefix of
s seems to indicate that a «real» string is expected while
i seems to indicate an integer value.
| Value name | Description | Example | Comment |
| Locale | | 00000409 | The hexadecimal representation of a language id. |
| LocaleName | | en-US | |
| s1159 | | AM | |
| s2359 | | PM | |
| sCountry | | United States | |
| sCurrency | Currency symbol | $ | |
| sDate | | / | These (up to 4, including NULL) characters correspond to the separators of day, month and year. (Deprecated in favor of sShortDate) |
| sDecimal | Decimal Symbol | . | |
| sGrouping | Digit grouping | 3;0 | |
| sLanguage | | ENU | |
| sList | List separator | , | The value of the list separator greatly influences the behavior of Excel, for example when importing/exporting CSV data or if an Excel worksheet function separates arguments with a semicolon or a comma. |
| sLongDate | Long date format | dddd, MMMM d, yyyy | |
| sMonDecimalSep | Decimal symbol (currency) | . | |
| sMonGrouping | Digit grouping (currency) | 3;0 | |
| sMonThousandSep | Digit grouping symbol (currency) | , | |
| sNativeDigits | Standard digits | 0123456789 | Can for example be set to Chinese digits (〇一二三四五六七八九) |
| sNegativeSign | | - | |
| sPositiveSign | | | |
| sShortDate | Short date format | M/d/yyyy | |
| sThousand | | , | |
| sTime | | : | |
| sTimeFormat | Long time format | h:mm:ss tt | |
| sShortTime | Short time format | h:mm tt | |
| sYearMonth | | MMMM yyyy | |
| iCalendarType | | 1 | |
| iCountry | | 1 | |
| iCurrDigits | Number of digits after decimal (Currency) | 2 | (get-culture).NumberFormat.CurrencyDecimalDigits |
| iCurrency | Positive currency format | 0 | How x currency units are displayed: 0 = $x, |
| iDate | | 0 | The short-date format ordering specifier: 0 = month, day, year; 1 = day, month, year, 2 = year, month, day. (sShortDate is preferred over iDate). |
| iDigits | Number of digits after decimal | 2 | |
| NumShape | Use native digits | 1 | 1 = Never |
| iFirstDayOfWeek | | 6 | 0 = Monday, … 6 = Sunday |
| iFirstWeekOfYear | | 0 | |
| iLZero | Display leading zeroes | 1 | |
| iMeasure | Measurement system | 1 | 0: Metric, 1: U.S. |
| iNegCurr | Negative currency format | 0 | |
| iNegNumber | Negative number format | 1 | |
| iPaperSize | | 1 | |
| iTime | | 0 | |
| iTimePrefix | | 0 | |
| iTLZero | | 0 | |
Modifying some settings in a PowerShell script
with get/set-culture
The PowerShell cmdLet noun
culture can be used to modify some (all) values in this
registry key:
$culture = get-culture
# Value being is changed
# --------------------------
$culture.dateTimeFormat.shortDatePattern = 'yyyy-MM-dd' # sShortDate, sDate, iDate
$culture.dateTimeFormat.shortTimePattern = 'HH:mm' # HH is supposed to be 24 hours, why does it not seem to be working.
$culture.dateTimeFormat.pmDesignator = '' # Don't show AM/PM
$culture.numberFormat.currencyPositivePattern = 2 # iCurrency
$culture.numberFormat.CurrencySymbol = 'EUR' # sCurrency
#
# Changing the list separator seems to
# be broken.
# https://github.com/dotnet/runtime/issues/43795
# use list-separator.ps1 instead.
#
#
$culture.textInfo.listSeparator = ',' # sList
set-culture $culture
With set-itemProperty
In fact, this method seems to be required in order to have a 24-hours without AM/PM designator, as per
this superuser answer.
The following
PowerShell script changes some of format settings that are specified in this registry key:
set-itemProperty 'hkcu:\Control Panel\International' sShortDate 'yyyy-MM-dd'
set-itemProperty 'hkcu:\Control Panel\International' sShortTime 'HH:mm' # Seconds not possible?
I am not sure what the best way is to apply the modifications after the script is run. Maybe something like the following:
get-process explorer | stop-process
explorer