Translation Config
Configure the multi-language translation system
Main configuration entry for the translation system. Configure languages, settings, and behaviours here. Available Placeholders: - %typewriter_translate_<key>% — Get translation by key - %typewriter_translate_lang% — Player's current language name - %typewriter_translate_lang_display% — Language display name - %typewriter_translate_lang_flag% — Language flag code - %typewriter_translate_count% — Total translation count
Campos
| Campo | Tipo | Predeterminado | Descripción | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
languages | List<LanguageConfig> | — | List of languages available for translation. Each language requires a unique name (e.g., 'en_GB', 'fr_FR').
|
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
flag | String | — | Banner flag code from https://www.needcoolshoes.com/banner Create a flag, then copy the code after 'banner?=' in the URL. Example: 'eapwplpnpmbzbj' for UK flag |
minecraftCodes | List<String> | empty | Minecraft locale codes that map to this language. Players with these client locales will be assigned this language. Example: ['en_GB', 'en_US', 'en_AU'] |
displayName | String | — | Display name shown in the language selector. Supports color codes with '&'. Example: '&3English (UK)'Placeholders |
fallbackLanguages | List<String> | empty | Languages to try if a translation is missing in this language. Falls back in order, then to main language. |
onChangeActions | List<Ref<TriggerableEntry>> | empty | TypeWriter actions to execute when a player switches to this language. Use this to send welcome messages, play sounds, etc. |
mainLanguageStringen_GBrunLanguageActionsOnJoinBooleanfalseforceClientLocaleOnJoinBooleanfalsetranslationsFolderStringTranslatelogLevelInt0aiTranslationAITranslationConfigAITranslationConfig (10)
| Campo | Tipo | Predeterminado | Descripción |
|---|---|---|---|
enabled | Boolean | false | Enable AI-powered automatic translation for chat |
provider | AIProvider | OPENROUTER | Translation backend. Picking one fills in its own base URL and model, so a key is usually the only thing left to set. OpenAI-compatible chat APIs: OPENROUTER, OPENAI, DEEPSEEK, GROQ, MISTRAL, OLLAMA, OPENAI_COMPATIBLE (any other server — set apiBaseUrl and model yourself). Own API shapes: ANTHROPIC, GEMINI. Dedicated translation engines (no LLM): LIBRETRANSLATE (self-hostable), DEEPL.Valores:OPENROUTEROPENAI |
apiKey | String | — | API Key for the selected provider. Use 'env:VAR_NAME' to read it from an environment variable instead of storing it in clear text. |
model | String | — | Model id. Leave empty to use the provider's default. Ignored by LibreTranslate and DeepL. |
apiBaseUrl | String | — | Base API URL. Leave empty to use the provider's default; required for OPENAI_COMPATIBLE and self-hosted LibreTranslate. |
systemPrompt | String | You are a professional Minecraft translator. Translate the message into the target language. Keep the original style and formatting. Only return the translated text. | System prompt to guide the AI translator |
noTranslateRegex | List<String> | — | List of regex patterns. Messages matching any of these will NOT be translated. |
censorRegex | List<String> | empty | List of regex patterns. Matching words will be replaced with '***' before translation. |
enabledSections | List<String> | — | Sections where translation is enabled (e.g. ['CHAT']) |
chatTranslationTimeoutMs | Long | 800 | Max time (ms) chat delivery waits for AI translations before rendering untranslated. A slow AI provider blocks every viewer's chat for up to this long, so keep it short. |
openSelectorCommandOverrideStringlanguageMenuRef<OpenGuiActionEntry>languageMenuViewIdStringsettingsMenuRef<OpenGuiActionEntry>settingsMenuViewIdStringHow to use it
Create one of these. The extension uses the first Translation Config it finds.
languages— one item per language.nameis the code used in the JSON files and by/translate <name>, so it must match exactly (comparisons in files are case-insensitive, in the command they are not).flagis a banner code from needcoolshoes.com/banner, kept for menus and<translate_lang_flag>.displayNameaccepts&color codes.minecraftCodeslists the client locales that map to this language.fallbackLanguagesare tried in order beforemainLanguage.onChangeActionsrun each time a player switches to this language, whatever the way (command, menu, action).runLanguageActionsOnJoinruns theonChangeActionsof the player's language at each join.forceClientLocaleOnJoinswitches the player when their client reports a matching locale change.translationsFolderis relative toplugins/Typewriter/.logLevelis documented in the field help (0 to 3), but the value is not read by the current code.languageMenuandsettingsMenupoint to GUI menu entries; see the extension page for the button types.