-
Notifications
You must be signed in to change notification settings - Fork 2
Localization
haibane84 edited this page Apr 18, 2012
·
11 revisions
ExtJS 4.x의 압축파일 안에는 locale이라는 폴더가있다. 해당 폴더안에 ext-lang-ko.js가 있는대 파일을 보면 어떻게 한글화가 되는지 알 수가 있다.
Ext.Date.monthNames = [ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월" ];
Ext.Date.dayNames = [ "일", "월", "화", "수", "목", "금", "토" ];
다국어처리를 지원하는 방법으로는 2가지 방법이 있겠다. 하나는 정적으로 적용하는 것이고 하나는 동적으로 적용하는 것이다. 본 문서에서는 동적으로 지원하는 방법에 대하여 기술하겠다.
아래와 같이 기본적인 HTML코드를 작성한다.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Localization example</title>
<!-- Ext Library Files -->
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css">
<script src="ext/ext-all-debug.js"></script>
<!-- App Scripts -->
<script src="languages.js"></script>
<script src="app.js"></script>
</head>
<body>
<div id="languages"></div>
<div id="datefield"></div>
</body>
</html>
우리는 두개의 자바스크립트 파일이 있다. 하나는 언어목록을 가지고 있는 파일이고 다른하나는 어플리케이션 파일이다. 또한 두개의 div 태그가 있는대 첫번째는 사용자가 선택할 언어 콤보박스이고 두번째는 data picker용이다.