Function Reference


Retrieves information about a locale specified by identifier

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


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

Windows Vista or later
$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.


#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)