Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

개발, 부동산, 의정부, etc

GetLocale 함수 본문

개발/classic asp

GetLocale 함수

NaCl대표 2019. 1. 30. 11:49

GetLocale 함수

현재 로케일 ID 값을 반환합니다.

GetLocale()

참고

로케일은 사용자의 언어, 국가 및 문화적 관습에 관련된 사용자 기본 설정 정보 세트입니다. 로케일에 따라 날짜, 시간, 숫자 및 통화 형식뿐만 아니라 자판 배열, 정렬 순서 등도 결정됩니다.

반환 값은 해당 로케일 ID 차트에 나열된 임의의 32비트 값입니다.

다음 예는 GetLocale 함수의 사용법을 보여줍니다. 이 코드를 사용하려면 표준 HTML 페이지의 <BODY> 태그 사이에 있는 전체 예제를 붙여넣습니다.

Enter Date in UK format: <input type="text" id="UKDate" size="20"><p>
Here's the US equivalent: <input type="text" id="USdate" size="20"><p>
<input type="button" value="Convert" id="button1"><p>
Enter a price in German: &nbsp; <input type="text" id="GermanNumber" size="20">
<p>
Here's the UK equivalent: <input type="text" id="USNumber" size="20"><p>
<input type="button" value="Convert" id="button2"><p>

<script language="vbscript">
Dim currentLocale
' 현재 로케일을 가져옵니다.
currentLocale = GetLocale

Sub Button1_onclick
  Dim original
  original = SetLocale("en-gb")
  mydate = CDate(UKDate.value)
  ' IE 항상 로케일을 영어(미국) 설정하므로
  ' currentLocale 변수를 사용하여 로케일을 영어(미국) 설정합니다.
  original = SetLocale(currentLocale)
  USDate.value = FormatDateTime(mydate,vbShortDate)
End Sub

Sub button2_onclick
  Dim original
  original = SetLocale("de")
  myvalue = CCur(GermanNumber.value)
  original = SetLocale("en-gb")
  USNumber.value = FormatCurrency(myvalue)
End Sub

</script> 


'개발 > classic asp' 카테고리의 다른 글

GetRef 함수  (0) 2019.01.30
GetObject 함수  (0) 2019.01.30
FormatPercent 함수  (0) 2019.01.30
FormatNumber 함수  (0) 2019.01.30
FormatDateTime 함수  (0) 2019.01.30
Comments