Have a look here: http://blogs.msdn.com/b/powershell/archive/2006/04/25/583235.aspx
and here: http://poshcode.org/2226 :
function Set-Culture([System.Globalization.CultureInfo] $culture) { [System.Threading.Thread]::CurrentThread.CurrentUICulture = $culture [System.Threading.Thread]::CurrentThread.CurrentCulture = $culture }
Additional Information
To find out what values โโyou can use for $culture :
This will give you a list of crop types:
[Enum]::GetValues([System.Globalization.CultureTypes])
When choosing one of the above types (for example, AllCultures), you can list the available values โโof this type:
[System.Globalization.CultureInfo]::GetCultures( [System.Globalization.CultureTypes]::AllCultures )
Then you can use the name or number of the culture you are interested in using the GetCultureInfo method to get the value you want:
$culture = [System.Globalization.CultureInfo]::GetCultureInfo(1033) $culture = [System.Globalization.CultureInfo]::GetCultureInfo('en-US')
Note. Thanks to the implicit conversion, you can simply pass the name or number of the culture (i.e. as a string or integer) to the Set-Culture method, which will be automatically converted to the expected CultureInfo value.
manojlds
source share