---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/hi/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/ko/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/ru/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/tr/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/vi/sdk/defold/environment.md
  - https://yandex.com/dev/games/doc/zh/sdk/defold/environment.md
  - href: ko/sdk/defold/environment.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/ko/llms.txt

# 환경 변수

게임 환경에 대한 정보를 얻을 수 있습니다. 이렇게 하려면 `ysdk.environment` 객체를 사용합니다.

```lua
{
  app: {
    id: string
  },
  browser: {
    lang: string
  },
  i18n: {
    lang: string;
    tld: string;
  },
  payload: string|nil;
}
```

## 환경 객체

게임 환경 변수를 포함합니다.

#|
|| **파라미터** | **유형** | **설명** ||
|| `app` | table | 게임 데이터. ||
|| `browser` | table | 브라우저 데이터. ||
|| `i18n` | table | 서비스 국제화. ||
|| `payload` | string\|nil | 게임 주소의 `payload` 파라미터 값입니다. 선택 사항입니다. 예를 들어, `https://yandex.ru/games/app/123?payload=test`에서는 다음과 같이 `test`를 반환할 수 있습니다. `ysdk.environment.payload`. ||
|#

### 앱 구조

#|
|| **파라미터** | **유형** | **설명** ||
|| `id` | string | 게임 ID. ||
|#

### 브라우저 구조

#|
|| **파라미터** | **유형** | **설명** ||
|| `lang` | string | ISO 639-1 형식의 브라우저 우선 언어입니다. ||
|#

### i18n 구조

#|
|| **파라미터** | **유형** | **설명** ||
|| `lang` | string | ISO 639-1 형식의 [Yandex Games 인터페이스 언어](https://yandex.com/dev/games/doc/ko/concepts/languages-and-domains.md#languages). 예를 들어, `"tr"`은 게임이 현재 Yandex Games 튀르키예어 인터페이스로 실행 중임을 의미합니다. 이 파라미터를 사용하여 게임에서 사용자의 언어를 결정하는 것이 좋습니다. ||
|| `tld` | string | 최상위 도메인. 예를 들어, `"com"`은 현재 게임이 Yandex Games의 국제 도메인에서 실행 중임을 의미합니다. 게임을 자신의 도메인에 배치할 때, 게임이 모든 Yandex 도메인에서 올바르게 열리는지 확인해야 합니다. ||
|#

---



<!-- source: ko/_includes/button-git-defold.md -->
<a href="https://github.com/yandex-games-plugins/defold">
  <span class="button">저장소</span>
</a>
<!-- endsource: ko/_includes/button-git-defold.md -->
