GlobalizationPreferences Class

Definition

A static class for holding various user globalization preferences.

public ref class GlobalizationPreferences abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics, 65536, Windows.Foundation.UniversalApiContract)]
class GlobalizationPreferences abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics, 65536, "Windows.Foundation.UniversalApiContract")]
class GlobalizationPreferences abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics2, 327680, "Windows.Foundation.UniversalApiContract")]
class GlobalizationPreferences abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics2, 327680, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.IGlobalizationPreferencesStatics3, 393216, "Windows.Foundation.UniversalApiContract")]
class GlobalizationPreferences abstract sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
public static class GlobalizationPreferences
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public static class GlobalizationPreferences
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics2), 327680, "Windows.Foundation.UniversalApiContract")]
public static class GlobalizationPreferences
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics2), 327680, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.IGlobalizationPreferencesStatics3), 393216, "Windows.Foundation.UniversalApiContract")]
public static class GlobalizationPreferences
Public Class GlobalizationPreferences
Inheritance
GlobalizationPreferences
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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;

Remarks

Version history

Windows version SDK version Value added
1709 16299 TrySetHomeGeographicRegion
1709 16299 TrySetLanguages
1803 17134 GetForUser

Properties

Calendars

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

Clocks

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

Currencies

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

HomeGeographicRegion

Gets the user's home geographic region.

Languages

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

WeekStartsOn

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

Methods

GetForUser(User)

Retrieves an object representing the globalization preferences of the specified user. This API is part of support for multi-user apps (MUA).

TrySetHomeGeographicRegion(String)

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

Note

This method is available only in Embedded mode.

TrySetLanguages(IEnumerable<String>)

Attempts to set the preferred languages on an IoT device.

Note

This method is available only in Embedded mode.

Applies to

See also