https://github.com/mklement0/wincustomlocalesamples
Files for experimenting with Windows Vista+ custom locales (cultures)
https://github.com/mklement0/wincustomlocalesamples
culture locale test windows
Last synced: 10 months ago
JSON representation
Files for experimenting with Windows Vista+ custom locales (cultures)
- Host: GitHub
- URL: https://github.com/mklement0/wincustomlocalesamples
- Owner: mklement0
- Created: 2018-09-11T16:51:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T17:03:04.000Z (over 7 years ago)
- Last Synced: 2025-01-18T17:52:04.752Z (12 months ago)
- Topics: culture, locale, test, windows
- Language: Lasso
- Homepage:
- Size: 214 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Files for experimenting with Windows Vista+ custom locales (cultures)
* `.ldml` ... XML source files for building locales via the Microsoft [Locale Builder](https://www.microsoft.com/en-us/download/details.aspx?id=41158).
* `.msi` ... installers generated by Locale Builder (that presumably wrap `*.nlp` files that can alternatively be output stand-alone); installations can be removed via `appwiz.cpl`
Terminology note: _locale_ is the term used by unmanaged code (Windows API), _culture_ is the equivalent term for managed code (.NET)
* The `en-US.*` files relate to a _replacement_ custom locale for the predefined (standard) `en-US` locale.
* The `en-ZZ.*` files relate to a (fictitious) _supplemental_ custom locale, derived from the neutral `en` locale.
Both custom locales modify the negative number sign and the number decimal separator.
Once the `*.msi` files are installed, you can inspect and use the custom locales as follows from PowerShell:
```powershell
# List the custom cultures' properties.
[cultureinfo] 'en-US' | Format-List; [cultureinfo] 'en-ZZ' | Format-List
# To see the modified number-format properties (.NegativeSign and .NumberDecimalSepator):
[cultureinfo] 'en-US' | % NumberFormat; [cultureinfo] 'en-ZZ' | % NumberFormat
# To apply a custom culture:
# Windows PowerShell caveat: culture reverts to previous one after each command line.
[cultureinfo]::currentculture = [cultureinfo] 'en-ZZ'; 1.2 # -> '1#2'
```