Описание
# Chat Language Translate (Minecraft Fabric)
**For Donation**
[Buy Me A Coffe](https://buymeacoffee.com/dukecan4)
A powerful Minecraft Fabric mod that provides real-time chat translation using the Google Translate API. Supporting multiple languages and offering both automatic and manual translation modes, it ensures you never miss a message in a multiplayer environment.
## 🚀 Features
- **Real-time Translation**: Automatically translates incoming chat messages.
- **Dual Modes**:
- **Auto-Translate**: Instantly shows the translated text below the original message.
- **Interactive Button**: Appends a `[Translate]` (or localized) button to messages for manual translation on click.
- **Dynamic Localization**: The UI and chat buttons update based on your selected primary language.
- **Target Language Indicator**: Displays the target language code (e.g., `(TR)`, `(EN)`) next to the translation.
- **High Compatibility**: Optimized for Minecraft 1.21 and above (1.21+).
- **Clean UI**: Uses gray italics for translations to keep the chat readable and professional.
## 🌍 Supported Languages
The mod currently supports the following primary target languages:
- **Turkish** (tr)
- **English** (en)
- **German** (de)
- **French** (fr)
- **Spanish** (es)
- **Russian** (ru)
- **Japanese** (ja)
- **Chinese** (zh-CN)
- **Korean** (ko)
- **Italian** (it)
- **Portuguese** (pt)
*Note: The mod can detect almost any language automatically; the list above defines the target languages you can select in the settings.*
## 🛠️ API & Technical Details
- **Translation Engine**: Uses the **Google Translate API** (Gtx) for fast and reliable translations without requiring a private API key.
- **Async Execution**: API calls are handled asynchronously to ensure zero impact on game performance (TPS/FPS).
- **Caching System**: Includes a temporary session cache to prevent redundant API calls for the same message.
- **Mixins**: Leverages SpongePowered Mixins to safely intercept chat packets at the `ChatHud` level.
## ⚙️ Requirements
To run this mod, you need:
1. **Fabric Loader**
2. **Fabric API**
3. **Mod Menu** (for configuration access)
4. **Cloth Config API**
## 📖 How to Use
1. Install the mod and its dependencies.
2. Launch Minecraft and go to **Options > Mods > Chat Language Translate > Config**.
3. Select your **Primary Language**.
4. Choose between **Auto Translate** or **Translate Button** mode.
5. Enjoy communicating with players from all over the world!
---
*Developed by dukecan*