> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/ko/configuration/overleaf-toolkit/localization.md).

# 현지화

### Overleaf i18 설정

{% hint style="info" %}
이 문서는 자체 호스팅된 **Overleaf** 인스턴스에서 국제화(i18n)를 구성하는 방법을 설명합니다.
{% endhint %}

Overleaf는 여러 언어로 번역되어 있습니다. 적절한 구성을 사용하면 다음이 가능합니다:

* Overleaf 인스턴스를 **단일 고정 언어로**, 또는
* 활성화 **여러 언어**, 사용자가 다음과 유사하게 동적으로 언어를 전환할 수 있도록 합니다 `www.overleaf.com`.

***

#### 단일 언어 구성

사이트 언어는 환경 변수 `OVERLEAF_SITE_LANGUAGE`(또는 `SHARELATEX_SITE_LANGUAGE` Overleaf 버전의 경우 **4.x 및 그 이전 버전**).

지원되는 언어 코드는 다음과 같습니다:

* `en` - 영어(기본값)
* `es` - 스페인어
* `pt` - 포르투갈어
* `de` - 독일어
* `fr` - 프랑스어
* `cs` - 체코어
* `nl` - 네덜란드어
* `sv` - 스웨덴어
* `it` - 이탈리아어
* `tr` - 터키어
* `zh-CN` - 중국어(간체)
* `no` - 노르웨이어
* `da` - 덴마크어
* `ru` - 러시아어
* `ko` - 한국어
* `ja` - 일본어
* `pl` - 폴란드어
* `fi` - 핀란드어

영어가 기본 언어입니다. 인터페이스 언어를 변경하려면(예: 중국어 간체로), 다음 줄을 추가하세요 `config/variables.env`:

{% code title="config/variables.env" %}

```bash
OVERLEAF_SITE_LANGUAGE=zh-CN
```

{% endcode %}

그런 다음 구성을 적용합니다:

```bash
bin/up
```

서비스가 재시작되면 웹 UI 메뉴의 인터페이스 언어가 새 설정을 반영해야 합니다.

#### 다국어 구성

사용자가 **로그아웃하지 않고 언어를 전환**할 수 있도록 하려면, Overleaf 인스턴스는 도메인 이름에 따라 서로 다른 언어를 제공하도록 구성되어야 합니다.

이 섹션은 다음을 가정합니다:

* 기본 도메인은 `overleaftest.com`
* 다음이 있습니다 **와일드카드 TLS 인증서** (예: `*.overleaftest.com`)
* 귀하는 **사용하고 있지 않습니다 `localhost`** (하위 도메인 기반 언어 라우팅을 지원할 수 없기 때문입니다)

로컬 테스트의 경우 다음과 같은 도메인을 사용할 수 있습니다: `dev-overleaf.com`.

{% stepper %}
{% step %}

### TLS 프록시 구성(Nginx)

TLS 리버스 프록시는 원본 `Host` 헤더를 전달해야 Overleaf가 사용자가 어떤 언어 도메인에 접근했는지 확인할 수 있습니다.

다음 지시문이 포함되어 있는지 확인하세요:&#x20;

```nginx
proxy_set_header Host $host;
```

Nginx 구성 예시는 다음과 같습니다:&#x20;

<pre class="language-nginx"><code class="lang-nginx">server {
    listen 443 ssl;
    server_name    _; # 모든 요청 처리, http://nginx.org/en/docs/http/server_names.html 참조
    server_name *.overleaftest.com;
    ssl_certificate /etc/nginx/ssl/nginx.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx.key;
    ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers   on;
    # Cloudflare 암호 모음 사용 https://github.com/cloudflare/sslconfig/blob/master/conf
    ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;

    # HSTS(HTTP Strict Transport Security)를 활성화하는 설정 https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
    # SSL 스트리핑을 방지하기 위해 https://en.wikipedia.org/wiki/SSL_stripping#SSL_stripping	
    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
    server_tokens off;
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    client_max_body_size 50M;

    location / {
        proxy_pass http://localhost:5000; # docker 컨테이너가 수신 중인 호스트/포트로 변경하세요.
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_read_timeout 3m;
        proxy_send_timeout 3m;
        
        # 이것을 nginx 설정에 추가하세요
<strong>        proxy_set_header Host $host;
</strong>    }
}
</code></pre>

{% endstep %}

{% step %}

### 쿠키 도메인 구성

사용자가 언어를 전환할 때 로그아웃되지 않도록 하려면, 쿠키가 언어 하위 도메인 간에 공유되어야 합니다.

다음 줄을 추가하세요 `config/variables.env`:

{% code title="config/variables.env" %}

```env
# 앞의 점에 유의하세요
COOKIE_DOMAIN=.overleaftest.com
```

{% endcode %}

이렇게 하면 인증 쿠키가 다음 아래의 모든 하위 도메인에서 유효합니다 `overleaftest.com`.
{% endstep %}

{% step %}

### 언어-도메인 매핑

다음으로, 언어 코드를 하위 도메인에 매핑하는 방법을 정의합니다\
`OVERLEAF_LANG_DOMAIN_MAPPING`.

#### 구성 예시

{% code title="config/variables.env" overflow="wrap" %}

```dotenv
OVERLEAF_LANG_DOMAIN_MAPPING='{"www": {"lngCode": "en","url": "https:\/\/www.overleaftest.com"},"cn": {"lngCode": "zh-CN","url": "https:\/\/cn.overleaftest.com"}}'
```

{% endcode %}

이 구성에서는:

* `https://www.overleaftest.com` → 영어 인터페이스
* `https://cn.overleaftest.com` → 중국어 간체 인터페이스

필요에 따라 이 매핑을 추가 언어와 하위 도메인으로 확장할 수 있습니다.
{% endstep %}

{% step %}

### Apex 도메인 리디렉션

마지막으로, apex 도메인(`overleaftest.com`)를 기본 언어 도메인(`www.overleaftest.com`).

<pre class="language-nginx"><code class="lang-nginx">server{
    listen 80;
    server_name overleaftest.com;
<strong>    return 301 https://www.overleaftest.com$request_uri;
</strong>}

server {
    listen 443 ssl http2;
    server_name overleaftest.com;
    ssl_certificate     /<a data-footnote-ref href="#user-content-fn-1">p</a>ath/to/fullchain.cer;
    ssl_certificate_key /path/to/overleaftest.com.key;
<strong>    return 301 https://www.overleaftest.com$request_uri;
</strong>}
</code></pre>

{% endstep %}
{% endstepper %}

[^1]:


---

# 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://overleaf-pro.ayaka.space/on-premises/ko/configuration/overleaf-toolkit/localization.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.
