GlobalizationPreferences GlobalizationPreferences GlobalizationPreferences GlobalizationPreferences Class

Definition

A static class for holding various user globalization preferences.

public : static class GlobalizationPreferences
public static class GlobalizationPreferences
Public Static Class GlobalizationPreferences
// This class does not provide a public constructor.
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 Calendars

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

public : static IVectorView<Platform::String> Calendars { get; }
public static IReadOnlyList<string> Calendars { get; }
Public Static ReadOnly Property Calendars As IReadOnlyList<string>
var iReadOnlyList = Windows.System.UserProfile.GlobalizationPreferences.calendars;
Value
IVectorView<Platform::String> IReadOnlyList<string> IReadOnlyList<string> IReadOnlyList<string>

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

Clocks Clocks Clocks Clocks

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

public : static IVectorView<Platform::String> Clocks { get; }
public static IReadOnlyList<string> Clocks { get; }
Public Static ReadOnly Property Clocks As IReadOnlyList<string>
var iReadOnlyList = Windows.System.UserProfile.GlobalizationPreferences.clocks;
Value
IVectorView<Platform::String> IReadOnlyList<string> IReadOnlyList<string> IReadOnlyList<string>

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

Currencies Currencies Currencies Currencies

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

public : static IVectorView<Platform::String> Currencies { get; }
public static IReadOnlyList<string> Currencies { get; }
Public Static ReadOnly Property Currencies As IReadOnlyList<string>
var iReadOnlyList = Windows.System.UserProfile.GlobalizationPreferences.currencies;
Value
IVectorView<Platform::String> IReadOnlyList<string> IReadOnlyList<string> IReadOnlyList<string>

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

HomeGeographicRegion 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
var string = Windows.System.UserProfile.GlobalizationPreferences.homeGeographicRegion;
Value
Platform::String string string string

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

Languages Languages Languages Languages

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

public : static IVectorView<Platform::String> Languages { get; }
public static IReadOnlyList<string> Languages { get; }
Public Static ReadOnly Property Languages As IReadOnlyList<string>
var iReadOnlyList = Windows.System.UserProfile.GlobalizationPreferences.languages;
Value
IVectorView<Platform::String> IReadOnlyList<string> IReadOnlyList<string> IReadOnlyList<string>

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

See Also

WeekStartsOn 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
var dayOfWeek = Windows.System.UserProfile.GlobalizationPreferences.weekStartsOn;
Value
DayOfWeek DayOfWeek DayOfWeek DayOfWeek

The day of the week that the week starts on.

Methods

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

Attempts to set the user's home geographic region on an IoT device.

Note

This method is available only in Embedded mode.

public : static Platform::Boolean TrySetHomeGeographicRegion(Platform::String region)
public static bool TrySetHomeGeographicRegion(String region)
Public Static Function TrySetHomeGeographicRegion(region As String) As bool
var bool = Windows.System.UserProfile.GlobalizationPreferences.trySetHomeGeographicRegion(region);
Parameters
region
Platform::String String String String

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

Returns
Platform::Boolean bool bool bool

true if HomeGeographicRegion was set; otherwise, false.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Your app must declare the systemManagement capability, which lets apps access basic system administration privileges including locale, timezone, shut down, and reboot.

The systemManagement capability must include the iot namespace when you declare it in your app's package manifest.

<Capabilities><iot:Capability Name="systemManagement"/></Capabilities>

TrySetLanguages(IIterable) TrySetLanguages(IIterable) TrySetLanguages(IIterable) TrySetLanguages(IIterable)

Attempts to set the preferred languages on an IoT device.

Note

This method is available only in Embedded mode.

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
var bool = Windows.System.UserProfile.GlobalizationPreferences.trySetLanguages(languageTags);
Parameters
languageTags
IIterable<Platform::String> IEnumerable<String> IEnumerable<String> IEnumerable<String>

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

Returns
Platform::Boolean bool bool bool

true if Languages was set; otherwise, false.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Your app must declare the systemManagement capability, which lets apps access basic system administration privileges including locale, timezone, shut down, and reboot.

The systemManagement capability must include the iot namespace when you declare it in your app's package manifest.

<Capabilities><iot:Capability Name="systemManagement"/></Capabilities>

See Also