UtilCultureSetThreadPreferredUILanguages(String) Method
Sets the preferred UI languages for the current thread.
To retrieve the preferred UI languages for the current thread,
call
GetThreadPreferredUILanguages function.
Namespace: DevCase.Core.Application.GlobalizationAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static int SetThreadPreferredUILanguages(
params string[] langNames
)
Public Shared Function SetThreadPreferredUILanguages (
ParamArray langNames As String()
) As Integer
Dim langNames As String()
Dim returnValue As Integer
returnValue = UtilCulture.SetThreadPreferredUILanguages(langNames)
public:
static int SetThreadPreferredUILanguages(
... array<String^>^ langNames
)
static member SetThreadPreferredUILanguages :
langNames : string[] -> int
No code example is currently available or this language may not be supported.
- langNames String
-
The name of the languages, in the format languagecode2-country/regioncode2 (eg. "en-US")
Int32
Returns the amount of languages that were successfully set.
This is a code example.
No code example is currently available or this language may not be supported.
Dim langNames As String() = {"en-US", "es-ES", "it-IT", "de-DE", "fr-FR"}
Dim successfulLangs As Integer = SetThreadPreferredUILanguages(langNames)
Console.WriteLine($"{NameOf(successfulLangs)}: {successfulLangs}")
Dim currentPreferredLangs As ReadOnlyCollection(Of CultureInfo) = GetThreadPreferredUILanguages()
Console.WriteLine($"{NameOf(currentPreferredLangs)}: {String.Join(", ", currentPreferredLangs.Select(Function(ci) ci.Name))}")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.