UtilCultureSetProcessPreferredUILanguages(CultureInfo) Method
Sets the preferred UI languages for the current process.
To retrieve the preferred UI languages for the current process,
call
GetProcessPreferredUILanguages 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 SetProcessPreferredUILanguages(
params CultureInfo[] cultures
)
public:
static int SetProcessPreferredUILanguages(
... array<CultureInfo^>^ cultures
)
static member SetProcessPreferredUILanguages :
cultures : CultureInfo[] -> int
No code example is currently available or this language may not be supported.
- cultures CultureInfo
-
An array of CultureInfo representing each language.
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 cultures As CultureInfo() = {
CultureInfo.CreateSpecificCulture("en-US"),
CultureInfo.CreateSpecificCulture("es-ES"),
CultureInfo.CreateSpecificCulture("it-IT"),
CultureInfo.CreateSpecificCulture("de-DE"),
CultureInfo.CreateSpecificCulture("fr-FR")
}
Dim successfulLangs As Integer = SetProcessPreferredUILanguages(cultures)
Console.WriteLine($"{NameOf(successfulLangs)}: {successfulLangs}")
Dim currentPreferredLangs As ReadOnlyCollection(Of CultureInfo) = GetProcessPreferredUILanguages()
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.