-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Closed
Copy link
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
Get-Culture currently supports returning information about the current culture.
It would be helpful if it supported a -Name switch to allow retrieving information about a specified culture.
(This would be analogous to existing Get-Date behavior, which by default returns the current date and optionally supports operating on a specified date via -Date.)
Also, as @iSazonov suggests, listing available cultures should be supported: -ListAvailable, supplemented by an optional -Type parameter that defaults to SpecificCultures - (see https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx for permissible values, though not all of them may make sense).
Desired behavior
# Should be the equivalent of: [cultureinfo]::GetCultureInfo('fr-FR')
> Get-Culture fr-FR # assumes that -Name is the 1st positional param
LCID Name DisplayName
---- ---- -----------
1036 fr-FR French (France)
# Should be the equivalent of [cultureinfo]::GetCultures('SpecificCultures')
> Get-Culture -ListAvailable
LCID Name DisplayName
---- ---- -----------
4096 af-NA Afrikaans (Namibië)
1078 af-ZA Afrikaans (South Africa)
# ....Environment data
PowerShell Core v6.0.0-beta (v6.0.0-beta.1)Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module