An open API service indexing awesome lists of open source software.

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)

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'
```