Click or drag to resize

SetAppLocaleID Function

X#
Sets the locale that the runtime uses for comparing strings when running in Windows collation mode (SetCollation(#Windows)).

Namespace:  XSharp.VO
Assembly:  XSharp.VO (in XSharp.VO.dll) Version: 2.19
Syntax
 FUNCTION SetAppLocaleID(
	uiNewLocale AS DWORD
) AS DWORD
Request Example View Source

Parameters

uiNewLocale
Type: DWord
Must be a valid LocaleId and can be constructed using the MAKELCID() and MAKELANGID() functions.

Return Value

Type: DWord
The previously installed Locale.
Remarks
This function sets the locale that the runtime uses for comparing strings when running in Windows collation mode (SetCollation(#Windows)), which is the default mode for X#. The string comparison is responsible for the sorting of DBF files, for comparing strings (including Asorting arrays of strings) and for the sort order within indexes. The default behaviour of the runtime is to read the locale id from the current user by calling the GetUserDefaultLCID() function. To avoid problem when different users using the same app have different Locales selected on their machines you can now control the Locale used by your app from within the code.
Examples
// To use the standard German Language in Phone Book sorting mode:

// To use the Swiss German Language in Default sorting mode
// To use the Norwegian Bokmal language, default sorting mode
// To use language independent sorting
See Also