Share via


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 bool TrySetLanguages(IIterable<Platform::String ^> ^ languageTags);
 static bool TrySetLanguages(IIterable<winrt::hstring> const& languageTags);
public static bool TrySetLanguages(IEnumerable<string> languageTags);
function trySetLanguages(languageTags)
Public Shared Function TrySetLanguages (languageTags As IEnumerable(Of String)) As Boolean

Parameters

languageTags

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

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

Returns

Boolean

bool

true if Languages was set; otherwise, false.

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

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>

Applies to