Globalization​Preferences Globalization​Preferences Globalization​Preferences Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

Prerelease. A static class for holding various user globalization preferences.

public : static class GlobalizationPreferencespublic static class GlobalizationPreferencesPublic Static Class GlobalizationPreferences
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

// Obtain the user's home geographic region.
var globalizationPreferences = Windows.System.UserProfile.GlobalizationPreferences;
var region = globalizationPreferences.homeGeographicRegion;
// Obtain the user's home geographic region.
var region = Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;

Properties

Calendars Calendars Calendars

Gets the set of calendars that are preferred by the user, in order of preference.

public : static IVectorView<string> Calendars { get; }public static IReadOnlyList<string> Calendars { get; }Public Static ReadOnly Property Calendars As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

One or more calendar identifiers for the user's preferred calendars.

Attributes

Clocks Clocks Clocks

Gets the set of clocks that are preferred by the user, in order of preference.

public : static IVectorView<string> Clocks { get; }public static IReadOnlyList<string> Clocks { get; }Public Static ReadOnly Property Clocks As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

One or more clock identifiers for the user's preferred clocks.

Attributes

Currencies Currencies Currencies

Gets the set of currencies that are preferred by the user, in order of preference.

public : static IVectorView<string> Currencies { get; }public static IReadOnlyList<string> Currencies { get; }Public Static ReadOnly Property Currencies As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

One or more currency identifiers for the user's preferred currencies.

Attributes

HomeGeographicRegion HomeGeographicRegion HomeGeographicRegion

Gets the user's home geographic region.

public : static PlatForm::String HomeGeographicRegion { get; }public static string HomeGeographicRegion { get; }Public Static ReadOnly Property HomeGeographicRegion As string
Value
PlatForm::String string string

The GeographicRegion identifier that represents the user's home location.

Attributes

Languages Languages Languages

Gets the set of languages that are preferred by the user, in order of preference.

public : static IVectorView<string> Languages { get; }public static IReadOnlyList<string> Languages { get; }Public Static ReadOnly Property Languages As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

One or more language identifiers for the user's preferred languages.

Attributes
See Also

WeekStartsOn WeekStartsOn WeekStartsOn

Gets the day of the week that is considered to be the first day of the week.

public : static DayOfWeek WeekStartsOn { get; }public static DayOfWeek WeekStartsOn { get; }Public Static ReadOnly Property WeekStartsOn As DayOfWeek
Value
DayOfWeek DayOfWeek DayOfWeek

The day of the week that the week starts on.

Attributes

Methods

TrySetHomeGeographicRegion(String) TrySetHomeGeographicRegion(String) TrySetHomeGeographicRegion(String)

Prerelease. Attempts to set the user's home geographic region.

public : static PlatForm::Boolean TrySetHomeGeographicRegion(PlatForm::String region)public static bool TrySetHomeGeographicRegion(String region)Public Static Function TrySetHomeGeographicRegion(region As String) As bool
Parameters
region
PlatForm::String String String

The GeographicRegion identifier that represents the user's home location.

Returns
PlatForm::Boolean bool bool

true if HomeGeographicRegion was set; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16190.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

TrySetLanguages(IIterable<String>) TrySetLanguages(IIterable<String>) TrySetLanguages(IIterable<String>)

Prerelease. Attempts to set the preferred languages.

public : static PlatForm::Boolean TrySetLanguages(IIterable<PlatForm::String> languageTags)public static bool TrySetLanguages(IEnumerable<String> languageTags)Public Static Function TrySetLanguages(languageTags As IEnumerable<String>) As bool
Parameters
languageTags
IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String>

One or more language identifiers for the user's preferred languages.

Returns
PlatForm::Boolean bool bool

true if Languages was set; otherwise, false.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16190.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

See Also