> For the complete documentation index, see [llms.txt](https://docs.myarc.icu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.myarc.icu/en/feature-configuration/languages.md).

# Language management

ArcMenu's command prompts, administrative feedback, and console logs are all driven by language files, and you can also use built-in language placeholders so text inside your menus switches automatically to match each player's language. Simplified Chinese (`zh_CN.yml`) and English (`en_US.yml`) are bundled by default, and all language files live in `plugins/ArcMenu/languages/`.

## Configuring default language and client locale matching

Under the `language` section of `plugins/ArcMenu/config.yml`, you can set the server's default language and choose whether to follow each player's client language setting:

```yaml
language:
  default: zh_CN
  follow-player-locale: true
```

These two fields work as follows:

* `default`: Enter the language code corresponding to a file in `languages/` (without the `.yml` extension, such as `zh_CN` or `en_US`). Server console logs—as well as player messages when no matching client language file is found—use the language specified here.
* `follow-player-locale`: Accepts boolean `true` or `false`, defaulting to `true`.
  * When set to **`true`**, the plugin automatically matches the language selected in each player's Minecraft client against the files in `languages/` (for example, an English client sees `en_US.yml` and a Chinese client sees `zh_CN.yml`). Regional variants of the same language (such as `en_GB` matching `en_US`) are matched automatically as well.
  * When set to **`false`**, all plugin messages and language placeholders shown to players use the `default` language regardless of what language their client is set to.

If you want every player on the server to see Simplified Chinese at all times, configure it like this:

```yaml
language:
  default: zh_CN
  follow-player-locale: false
```

## Using localized text in menus

Instead of hardcoding text directly inside menu configuration files, you can place menu titles, button labels, or tooltip descriptions inside your language files and reference them in menus with the built-in `%arcmenu_lang_<key>%` placeholder. ArcMenu resolves this placeholder natively without requiring PlaceholderAPI (the bundled sample menus also use localization keys such as `%arcmenu_lang_samples.default-menu-001%`).

For example, first add a nested key `menus.guide.title` to both `languages/zh_CN.yml` and `languages/en_US.yml`:

```yaml
# languages/zh_CN.yml
menus:
  guide:
    title: '&e服务器生存指南'
```

```yaml
# languages/en_US.yml
menus:
  guide:
    title: '&eServer Survival Guide'
```

Then reference that key in a frontend text element or tooltip inside your menu configuration:

```yaml
frontend:
  title-text:
    type: text
    content: '%arcmenu_lang_menus.guide.title%'
```

With `follow-player-locale` set to `true`, Chinese and English client players opening the exact same menu will each see the title in their own language.

## Editing translations and adding new languages

To adjust the wording or color of an existing message, open the corresponding file in `plugins/ArcMenu/languages/` (such as `en_US.yml` or `zh_CN.yml`) and edit it directly. Keep argument placeholders like `{0}` and `{1}` intact, as they are replaced at runtime with live values such as menu names, coordinates, or counts.

To add support for another language on your server (such as French or Japanese):

1. Copy `languages/zh_CN.yml` or `en_US.yml`.
2. Rename the new file using a standard `language_REGION` code, such as `fr_FR.yml` or `ja_JP.yml`.
3. Translate the message entries and any custom menu keys inside the file. If individual keys are left untranslated, the plugin automatically fills them in using the `default` language or built-in fallback strings.
4. Save the file and run `/arcmenu reload` to apply your changes.

Language files handle both the plugin's own command and system messages and localized menu strings via `%arcmenu_lang_<key>%`. The visual editor (ArcMenu Editor) automatically follows the language selected in your game client.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.myarc.icu/en/feature-configuration/languages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
