> For the complete documentation index, see [llms.txt](https://kbanimation.gitbook.io/kbanimation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbanimation.gitbook.io/kbanimation/language.md).

# language

{% tabs %}
{% tab title="EN" %}

## 🌐 Language & Translation System

KbAnimation supports multi-lingual chat notifications. Language files are located within the `plugins/KbAnimation/lang/` directory.

### Configuring Language

Define which locale the plugin should read inside `config.yml`:

```yaml
settings:
  language: "en"                     # Use "th" for messages_th.yml, or "en" for messages_en.yml
```

### Translation Key Reference Table

| Language Key                  | Variables Used | Description                                                          |
| ----------------------------- | -------------- | -------------------------------------------------------------------- |
| `customize_enter`             | None           | Sent when starting the gun customization screen.                     |
| `customize_exit`              | None           | Sent when exiting the customization screen.                          |
| `customize_select`            | `{attachment}` | Action bar text highlighting the currently selected attachment slot. |
| `customize_no_attachments`    | None           | Sent when player tries to detach but has no attachments.             |
| `customize_action_bar`        | None           | Action bar instructions showing controls during customization.       |
| `attachment_removed_info`     | `{attachment}` | Notification when a part is detached successfully.                   |
| `attachment_already_equipped` | None           | Sent when trying to equip an attachment already on the gun.          |
| `attachment_conflict`         | `{attachment}` | Sent when equipping two attachments of matching groups.              |
| `attachment_not_compatible`   | None           | Sent when trying to attach an item not compatible with the weapon.   |
| `attachment_equipped_success` | None           | Success notice when a part is attached.                              |

### Language File Examples

#### messages\_en.yml

```yaml
customize_enter: "<green>[+] Entered Customization Mode. Movement Frozen."
customize_exit: "<red>[-] Exited Customization Mode."
customize_select: "Selected Attachment: <yellow>{attachment}"
customize_no_attachments: "<gray>No attachments found on weapon to remove."
customize_action_bar: "<yellow>[F] Cycle <gray>|<yellow> [Left-Click Hand Item] Equip <gray>|<yellow> [Left-Click Empty] Detach"
attachment_removed_info: "<red>[-] Detached {attachment}."
attachment_already_equipped: "<red>This attachment is already equipped!"
attachment_conflict: "<red>Conflict: Only one {attachment} slot item allowed!"
attachment_not_compatible: "<red>This attachment is not compatible with this weapon!"
attachment_equipped_success: "<green>[+] Attachment successfully equipped."
```

{% endtab %}

{% tab title="TH" %}

## 🌐 ระบบภาษา & การแปลข้อความ

KbAnimation รองรับการแสดงผลข้อความแจ้งเตือนผู้เล่นหลากหลายภาษา ไฟล์ภาษาทั้งหมดจะจัดเก็บแยกกันอยู่ภายในโฟลเดอร์ `plugins/KbAnimation/lang/`

### วิธีเปิดใช้งานภาษา

แก้ไขตัวแปรภาษาให้ตรงกับชื่อย่อไฟล์ภาษาในโฟลเดอร์ lang เช่น `messages_th.yml` ในไฟล์ `config.yml`:

```yaml
settings:
  language: "th"                     # ใส่ "th" สำหรับภาษาไทย หรือ "en" สำหรับภาษาอังกฤษ
```

### ตารางอ้างอิงรหัสคีย์ข้อความ (Message Keys)

| คีย์ข้อความ (Key)             | ตัวแปรที่ใช้ได้ | หน้าที่การทำงาน                                                   |
| ----------------------------- | --------------- | ----------------------------------------------------------------- |
| `customize_enter`             | ไม่มี           | ส่งหาผู้เล่นเมื่อกดเข้าโหมดแต่งปืนสำเร็จ.                         |
| `customize_exit`              | ไม่มี           | ส่งหาผู้เล่นเมื่อกดออกจากโหมดแต่งปืน.                             |
| `customize_select`            | `{attachment}`  | ข้อความบนแถบ Action bar บอกชื่อของแต่งที่เลือกอยู่.               |
| `customize_no_attachments`    | ไม่มี           | แจ้งเตือนเมื่อพยายามจะถอดของแต่ง ทั้งๆ ที่ปืนไม่มีของแต่งอยู่เลย. |
| `customize_action_bar`        | ไม่มี           | ข้อความแสดงวิธีควบคุมปุ่มกดขณะแต่งปืนบนแถบ Action bar.            |
| `attachment_removed_info`     | `{attachment}`  | แจ้งเตือนเมื่อถอดของแต่งปืนชิ้นนั้นๆ สำเร็จ.                      |
| `attachment_already_equipped` | ไม่มี           | แจ้งเตือนเมื่อพยายามสวมของแต่งปืนชิ้นเดิมซ้ำซ้อน.                 |
| `attachment_conflict`         | `{attachment}`  | แจ้งเตือนเมื่อของแต่งประเภทเดียวกันชนกัน (เช่น ใส่กล้องซ้อนกัน).  |
| `attachment_not_compatible`   | ไม่มี           | แจ้งเตือนเมื่อพยายามเอาของแต่งปืนรุ่นอื่นมาใส่ปืนกระบอกนี้.       |
| `attachment_equipped_success` | ไม่มี           | แจ้งเตือนผู้เล่นเมื่อติดตั้งของแต่งสำเร็จ.                        |

### ตัวอย่างข้อความภายในไฟล์ภาษาไทย

#### messages\_th.yml

```yaml
customize_enter: "<green>[+] เข้าสู่โหมดแต่งปืน ล็อกการเคลื่อนที่ชั่วคราว"
customize_exit: "<red>[-] ออกจากโหมดแต่งปืนเรียบร้อย"
customize_select: "ของแต่งปืนที่เลือกอยู่: <yellow>{attachment}"
customize_no_attachments: "<gray>ไม่พบของแต่งติดตั้งบนปืนให้ถอดออก"
customize_action_bar: "<yellow>[F] สลับของแต่ง <gray>|<yellow> [คลิกซ้ายถือของ] สวมใส่ <gray>|<yellow> [คลิกซ้ายมือเปล่า] ถอดออก"
attachment_removed_info: "<red>[-] ถอดของแต่ง {attachment} ออกแล้ว"
attachment_already_equipped: "<red>ของแต่งชิ้นนี้ได้รับการติดตั้งอยู่แล้ว!"
attachment_conflict: "<red>ติดตั้งไม่ได้: ใส่ของแต่งกลุ่ม {attachment} ได้ชิ้นเดียวเท่านั้น!"
attachment_not_compatible: "<red>ของแต่งชิ้นนี้ไม่สามารถใช้งานร่วมกับปืนกระบอกนี้ได้!"
attachment_equipped_success: "<green>[+] ติดตั้งของแต่งปืนเรียบร้อยแล้ว"
```

{% endtab %}
{% endtabs %}


---

# 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://kbanimation.gitbook.io/kbanimation/language.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.
