Listing Available Culture IDs

Ever needed to get your hands on some specific culture IDs? Here is how you can create a list:

[System.Globalization.CultureInfo]::GetCultures('WindowsOnlyCultures')

Next, you can use a culture to output information formatted in that culture:

$c = [System.Globalization.CultureInfo]'ar-IQ'
[System.Threading.Thread]::CurrentThread.CurrentCulture = $c; Get-Date

You should note that the console character set is not able to display certain characters. You may want to run that command inside the PowerShell ISE or another Unicode-enabled environment.

Twitter This Tip! ReTweet this Tip!


Posted Oct 22 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.