GlobalizationPreferences.TrySetLanguages(IIterable<String>) GlobalizationPreferences.TrySetLanguages(IIterable<String>) GlobalizationPreferences.TrySetLanguages(IIterable<String>) GlobalizationPreferences.TrySetLanguages(IIterable<String>) GlobalizationPreferences.TrySetLanguages(IIterable<String>) Method

Definition

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)
static bool TrySetLanguages(IIterable<winrt::hstring> languageTags) const;
public static bool TrySetLanguages(IEnumerable<String> languageTags)
Public Shared Function TrySetLanguages(languageTags As IEnumerable(Of String)) As bool
var bool = Windows.System.UserProfile.GlobalizationPreferences.trySetLanguages(languageTags);

Parameters

languageTags
IEnumerable<String> IEnumerable<String> IEnumerable<String>

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

Returns

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>