Muokkaa

Jaa


Get-UICulture

Gets the current UI culture settings in the operating system.

Syntax

Get-UICulture []

Description

The Get-UICulture cmdlet gets information about the current user interface (UI) culture settings for Windows. The UI culture determines which text strings are used for user interface elements, such as menus and messages.

You can also use the Get-Culture cmdlet, which gets the current culture on the system. The culture determines the display format of items such as numbers, currency, and dates.

Examples

Example 1: Get the UI culture

Get-UICulture

This command gets the current UI culture information.

Example 2: Get the UI culture and format the results

Get-UICulture | Format-List *

This command displays the values of all of the properties of the current UI culture in a list.

Example 3: Get the value of the Calendar property

(Get-UICulture).Calendar

This command displays the current values for the Calendar property of the current UI culture. Calendar is just one property of UI culture. To see all of the properties, type Get-UICulture | Get-Member.

Example 4: Get the short date pattern

(Get-UICulture).DateTimeFormat.ShortDatePattern

This command displays the short date pattern for the current UI culture. To see all of the subproperties of the DateTimeFormat property of the UI culture, type (Get-UICulture).DateTimeFormat | Get-Member.

Inputs

None

You can't pipe objects to this cmdlet.

Outputs

CultureInfo

This cmdlet returns an object representing the current UI culture. In PowerShell 3.0 and later, it returns a CultureInfo object.

Microsoft.PowerShell.VistaCultureInfo

In Windows PowerShell 2.0 and earlier, this cmdlet returns a VistaCultureInfo object.

Notes

You can also use the $PSCulture and $PSUICulture variables. The $PSCulture variable stores the name of the current culture, and the $PSUICulture variable stores the name of the current UI culture.