Get information about regional settings e.g. current language and keyboard layout.
Syntax
Get-Culture [CommonParameters]
Properties available:
AbbreviatedDayNames AbbreviatedMonthGenitiveNames AbbreviatedMonthNames AlgorithmType AMDesignator Calendar Calendar CalendarType CalendarWeekRule CompareInfo CultureTypes DateSeparator DateTimeFormat DayNames DisplayName EnglishName Eras FirstDayOfWeek FullDateTimePattern IetfLanguageTag IsNeutralCulture IsReadOnly IsReadOnly IsReadOnly KeyboardLayoutId LCID LongDatePattern LongTimePattern MaxSupportedDateTime MinSupportedDateTime MonthDayPattern MonthGenitiveNames MonthNames Name NativeCalendarName NativeName NumberFormat OptionalCalendars PMDesignator RFC1123Pattern ShortDatePattern ShortestDayNames ShortTimePattern SortableDateTimePattern TextInfo ThreeLetterISOLanguageName ThreeLetterWindowsLanguageName TimeSeparator TwoDigitYearMax TwoLetterISOLanguageName UniversalSortableDateTimePattern UseUserOverride YearMonthPattern
Return type:
System.Globalization.CultureInfo object
This demonstrates drilling down and displaying the properties and sub-properties of the object.
PS C:\> $c = get-culture
PS C:\> $c | Format-List -property *
PS C:\> $c.calendar
PS C:\> $c.datetimeformat
PS C:\> $c.datetimeformat.firstdayofweek
Title-case a string so that each word starts with an uppercase letter:
PS C:\> $string = "this is a word or sentence"
PS C:\> $textInfo = (Get-Culture).TextInfoPS C:\> $textInfo.ToTitleCase($string)
This Is A Word Or Sentence
âThe eternally incomprehensible thing about the world is that it is comprehensibleâ ~ Albert Einstein
Set-Culture - Set the user culture for the current user account.
Get-UICulture - Get User Interface culture information.
Get-WinSystemLocale - Get the System-locale setting for the current computer.
ToLower() and ToUpper() methods.