> For the complete documentation index, see [llms.txt](https://docs.cs-cart.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cs-cart.jp/theme-development/language-variables-in-themes.md).

# テーマの言語変数

{% hint style="info" %}
HINT

この機能は、CS-Cart4.4.1以前では利用できません。
{% endhint %}

言語変数はテーマを使っても追加できます。翻訳ファイルは、テーマディレクトリの`langs`サブディレクトリに配置し、次のように名前を付ける必要があります。\
`言語コード.po`（例：en.po）

{% hint style="info" %}
HINT

テーマの言語変数は、テーマのインストール時にデータベースに追加されます。
{% endhint %}

テーマのデフォルト言語を指定できます。テーマが翻訳されていないすべての言語の翻訳を提供するために使用されます。テーマのデフォルト言語を指定するには、テーマの`manifest.json`に`default_language`フィールドを使用します。

`default_language`が指定されている場合：

* `langs`ディレクトリにショップのデフォルト言語のPOファイルが含まれている場合、それがデフォルト言語として使用されます。
* `langs`ディレクトリにショップのデフォルト言語のPOファイルが含まれていない場合、ディレクトリ内の最初のPOファイルがデフォルトの翻訳に使用されます。

{% hint style="info" %}
HINT

ショップのデフォルト言語は、基本設定→表示設定の`ショップページのデフォルト言語`によって決定されます。
{% endhint %}


---

# 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:

```
GET https://docs.cs-cart.jp/theme-development/language-variables-in-themes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
