GlobalizationPreferences.TrySetLanguages(IIterable<String>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
One or more language identifiers for the user's preferred languages.
Returns
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>