Skip to content

Commit

Permalink
add print info tool
Browse files Browse the repository at this point in the history
  • Loading branch information
dgg committed Mar 18, 2024
1 parent 6444777 commit e4e3805
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/Print-Info.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using namespace System.Globalization
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, HelpMessage = "Culture to print information")]
[Alias("c")]
[String]$CultureName
)

$ci = [CultureInfo]::GetCultureInfo($CultureName)
$ri = New-Object -TypeName RegionInfo -ArgumentList $ci.LCID

Write-Host "RegionInfo" -ForegroundColor Blue
$ri | Format-List -Property CurrencyEnglishName,CurrencyNativeName
Write-Host "CultureInfo.NumberFormat" -ForegroundColor Blue
$ci.NumberFormat | Format-List -Property CurrencySymbol `
,CurrencyDecimalDigits,CurrencyDecimalSeparator `
,CurrencyGroupSeparator,CurrencyGroupSizes `
,CurrencyPositivePattern,CurrencyNegativePattern

0 comments on commit e4e3805

Please sign in to comment.