> For the complete documentation index, see [llms.txt](https://docs.wepin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wepin.io/widget-integration/web-javascript-sdk/login-library/init.md).

# 초기화하기

Wepin Login Library를 초기화하는 방법입니다.&#x20;

## init

Wepin Login Library 초기화 합니다. 초기화시에  위젯 화면에 보여질 언어를 설정합니다.

```javascript
await wepinLogin.init(language?)
```

### **Parameters**

* `language`: \<string>\
  위젯 기본 언어 설정, 기본 값은 `'en'` 입니다. 현재 지원하는 언어는 `'ko'`, `'en'`, `'ja'`3가지 입니다.

### **Return value**

* `Promise`\<void>

### Example

```javascript
await wepinLogin.init('ko')
```

## isInitialized

Wepin Login Library가 정상적으로 초기화 되었는지 확인할 수 있습니다.&#x20;

```javascript
wepinLogin.isInitialized()
```

### **Parameters**

* \<void>

### **Return Value**

* `<boolean>`\
  초기화가 정상적으로 잘 된 경우 **true** , 실패한 경우 **false** 를 반환합니다.

### **Example**

```javascript
if(wepinLogin.isInitialized()) {
  console.log('wepinSDK is initialized!')
}
```

## changeLanguage

위젯의 언어를 변경할 수 있습니다.

```javascript
wepinLogin.changeLanguage(language)
```

### **Parameters**

* `language` \<string>\
  위젯에 표시될 언어를  지정합니다. 현재 지원하는 언어는 `'ko'`, `'en'`, `'ja'` 3가지 입니다.

### Example

```javascript
wepinLogin.changeLanguage('ko')
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wepin.io/widget-integration/web-javascript-sdk/login-library/init.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
