setLocale (method)

시트에 설정된 언어의 종류를 변경하는 메소드입니다.

Syntax

void setLocale( code, load, path, render );

Parameters

Name Type Required Description
code string 필수 시트에 설정할 언어 코드
('Ko', 'En', 'Jp', 'Cn', etc) (default:'Ko')
load boolean 선택 해당 언어의 메시지가 없을때 동적으로 파일을 로드할지 여부 (default:0(false))
path string 선택 메시지 언어팩이 있는 경로 (default:ibsheet.js 기준 locale 폴더)
render boolean 선택 시트에 언어 설정 후 시트 리렌더 여부 (default:0(false))

Return Value

boolean

Example

// 시트에 사용될 메시지를 영문 전용 메시지로 변경
// ibsheet.js에서 locale/en.js 파일을 ajax 호출하여 적용
sheet.setLocale( 'En' );

-------------------------------------------------

<script src="/ibsheet/locale/ko.js"></script>
<script src="/ibsheet/locale/en.js"></script>
<script src="/ibsheet/locale/jp.js"></script>

// 시트에 사용될 메시지를 영문 전용 메시지로 변경
// en.js을 호출하였기 때문에 ajax 통신하지 않고 적용
sheet.setLocale( 'En' );

-------------------------------------------------

// 시트에 사용될 메시지를 영문 전용 메시지로 변경
//ibsheet 폴더의 en.js 파일을 ajax 호출하여 적용
sheet.setLocale({code : "En", path:"/ibsheet/"} );

Read More

Since

product version desc
core 8.0.0.2 기능 추가