Function Reference


_WinAPI_GetLocaleInfo

Retrieves information about a locale specified by identifier

#include <WinAPILocale.au3>
_WinAPI_GetLocaleInfo ( $iLCID, $iType )

Parameters

$iLCID The locale identifier (LCID) that specifies the locale or one of the following predefined values.
$LOCALE_INVARIANT
$LOCALE_SYSTEM_DEFAULT
$LOCALE_USER_DEFAULT

Windows Vista or later
$LOCALE_CUSTOM_DEFAULT
$LOCALE_CUSTOM_UI_DEFAULT
$LOCALE_CUSTOM_UNSPECIFIED
$iType The one of the locale information constants ($LOCALE_*) to retrieve.

Return Value

Success: String containing the requested information.
Failure: Empty string and sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

See Also

Search GetLocaleInfo in MSDN Library.

Example

#include <APILocaleConstants.au3>
#include <WinAPILocale.au3>

Local $iID = _WinAPI_GetUserDefaultLCID()

ConsoleWrite('Language => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_SLANGUAGE) & @CRLF)
ConsoleWrite('Date format => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_SSHORTDATE) & @CRLF)
ConsoleWrite('Time format => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_STIMEFORMAT) & @CRLF)
ConsoleWrite('Currency name => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_SNATIVECURRNAME) & @CRLF)
ConsoleWrite('Monetary symbol => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_SCURRENCY) & @CRLF)