# Function Reference

# _WinAPI_SetLocaleInfo

Sets an item of information in the user override portion of the current locale

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

## 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 | Type of locale information to set. This parameter can be one of the locale information constants ($LOCALE_*).
$sData | The string containing the locale information to set. The information must be in the format specific to the specified constant.

## Return Value

Success: | True
Failure: | False

## Remarks

$LOCALE_* constants require #include <APILocaleConstants.au3>.

## Related

_WinAPI_GetLocaleInfo

## See Also

Search SetLocaleInfo in MSDN Library.

## Example

    #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('Date format => ' & _WinAPI_GetLocaleInfo($iID, $LOCALE_SLONGDATE) & @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)

    Local $sLongDate = _WinAPI_GetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SLONGDATE)
    Local $sShortDate = _WinAPI_GetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SSHORTDATE)

    ConsoleWrite(@CRLF & "--- SetLocaleInfo ---" & @CRLF)
    _WinAPI_SetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SLONGDATE, 'dddd, MMMM dd, yyyy')
    ConsoleWrite('Date format => ' & _WinAPI_GetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SLONGDATE) & @CRLF)
    _WinAPI_SetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SSHORTDATE, 'dd-MMM-yy')
    ConsoleWrite('Date format => ' & _WinAPI_GetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SSHORTDATE) & @CRLF)

    _WinAPI_SetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SLONGDATE, $sLongDate)
    _WinAPI_SetLocaleInfo($LOCALE_USER_DEFAULT, $LOCALE_SSHORTDATE, $sShortDate)