GetLocale function
Returns the current locale ID value.
GetLocale()
Description
locale is a collection of user reference information, which is related to the user's language, country and cultural tradition. locale Determines the keyboard layout, alphabetical sort order, and date, time, number, and currency format.
The return value can be any 32-bit value, as shown in the locale ID:
The following example illustrates the use of the getlocale function. To use this code, copy all the content between the <BODY>L flags in the standard HTML file.
Enter Date in UK format: <input type= "text" id= "ukdate" size= "" ><p>here "S" US equivalent: <input type= "Text" id= "usdate" size= "><p><input type=" button "value=" Convert "id=" Button1 "><p>enter A Price in German: <input type= "text" id= "Germannumber" size= "" ><p>here ' the UK equivalent: <input type= "Text" id= "Usnumber" size= "><p><input type=" button "value=" Convert "id=" Button2 "><p>< Script language= "VBScript" >dim Currentlocale ' get the current Localecurrentlocale = GetLocale Sub button1_onclick Dim Original original = SetLocale ("EN-GB") MyDate = CDate ( Ukdate.value) ' IE always sets the locale to us 中文版 so with the ' Currentlocale variable to set the locale to US Englis H original = SetLocale (currentlocale) Usdate.value = FormatDateTime (mydate,vbshortdate) End SubSub Button2_onclick Dim Original original = SetLocale ("de") myvalue = CCur (germannumber.value) original = SetLocale ("EN-GB") Usnumber.value = Form Atcurrency (myvalue) End sub</script>