Skip to content
KernelSpecterPublic

About

Offline chat translation for Minecraft 1.8.9 Forge and Lunar Client. No API keys, no rate limits.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Parley

Chat translation for Minecraft 1.8.9 (Forge, works in Lunar Client). Lines are translated with Google Translate first. If Google fails, Parley tries the translator built into Microsoft Edge, and if both fail it uses a translation model that runs on your own PC. No API keys are needed, and when the online services rate-limit you or go down, translation keeps working offline.

Every chat line gets a small [T] in front of it. Click it and the line is translated into English, tagged with the language it came from:

[T] [VIP] Mateo: alguien quiere jugar bedwars conmigo?
[ES] [VIP] Mateo: Anybody want to play BedWars with me?

Hover the translated line to see the original. If you'd rather have every foreign line translated without clicking, turn that on with /tr in on. You can also write in English and have Parley send your messages in another language.

Install

  1. Download parley-1.2.0.jar from the releases page.
  2. Put it in your Forge 1.8.9 mods folder. For Lunar Client that is %USERPROFILE%\.lunarclient\profiles\1.8\mods\forge-1.8.9\.
  3. Start the game.

The first time a language needs the offline model (because Google and Edge both failed, or online translation is off), Parley downloads it (about 110 MB, once) and shows the translation as soon as the download finishes. Models are stored in .minecraft\config\parley\models\.

Windows 64-bit only for now.

Commands

Command What it does
/tr Status and help
/tr in on / off Translate every foreign line automatically instead of on click (off by default)
/tr button on / off Show or hide the [T] buttons
/tr out <language> Translate everything you type into that language. Commands are never touched
/tr out off Send messages as you type them again
/tr say <language> <message> Translate and send a single message
/tr langs Supported languages and which models are downloaded
/tr ignore <language> Leave a language you can read out of automatic translation. Run it again to undo
/tr download <language> Download a language's models now instead of on first use
/tr auto on / off Download models automatically when a new language appears
/tr online on / off Use Google and Edge before the offline models (on by default). Turn it off to keep chat on your PC

Languages can be given as a code (es) or a name (spanish). /parley works as an alias for /tr.

What it avoids

  • Clicking always translates. A clicked line skips the language checks below. If Parley can't tell which language it is, the multilingual model works it out, and a line that turns out to be English gets a short note instead of a copy of itself.
  • Automatic mode leaves English alone. With /tr in on, every line is checked first, and English chat, slang like gg ez or rn, and lines Parley isn't sure about are skipped. If a translation comes back almost identical to the original, it is dropped.
  • Game terms stay intact. BedWars, SkyWars, SkyBlock, UHC and similar names are kept as they are instead of becoming "guerras de cama".
  • Chat shorthand is expanded before translating, so u, pls and idk in your messages, or xq, vc and tmb in other people's, come out as real words.

Online and offline

With /tr online on (the default), each line goes to Google first, then Edge, then the offline model. A service that fails is skipped for two minutes, or ten if it reports a rate limit, so a dead service doesn't slow every line down. Failures are written to the game log, not to chat. Online translation sends the chat text to Google or Microsoft. If you don't want that, /tr online off keeps everything on your PC.

Writing in a language still needs Parley to support that language offline (see Languages), even when Google or Edge does the translating.

Performance

Translation runs on one low priority background thread and never on the render thread, so it doesn't cost frames. A typical chat line takes 100 to 400 ms on one CPU core. Each loaded model takes about 280 MB of memory. At most two are loaded at once, and a model that hasn't been needed for five minutes is unloaded. Repeated messages are cached.

Languages

Reading (into English): Spanish, Portuguese, French, German, Italian, Dutch, Polish, Russian, Ukrainian, Turkish, Czech, Slovak, Swedish, Danish, Norwegian, Finnish, Estonian, Indonesian, Tagalog, Romanian, Hungarian, Croatian, Slovenian, Lithuanian, Latvian, Catalan, Afrikaans, Vietnamese, Bulgarian, Japanese, Chinese, Korean, Arabic, Thai, Hindi, Persian, Greek and Hebrew.

Writing (from English): all of the above except Slovak, Tagalog and Korean. Languages marked with * in /tr langs go through a shared multilingual model and come out rougher than the rest.

With Google or Edge, quality is what you would get on their websites. The offline model is good for normal sentences and weaker for heavy slang or typos. It is a small model, not DeepL.

How it works

Online, Parley calls the free endpoints behind Google Translate's browser extension (translate.googleapis.com) and Edge's built-in page translation (api-edge.cognitive.microsofttranslator.com). These are not official APIs and may change or stop working; when they do, the offline model takes over.

Offline, Parley uses the Opus-MT translation models from the University of Helsinki, in the ONNX versions published by Xenova, and runs them with ONNX Runtime. Text is split into tokens by a small SentencePiece implementation in plain Java. Languages are detected from character patterns and word frequencies; Japanese, Chinese, Korean, Arabic and other scripts are recognised by their alphabet.

Building

Needs JDK 8.

gradlew setupCIWorkspace build

The jar ends up in build/libs. The engine tests compare against reference output and need downloaded models; point PARLEY_MODELS at a folder containing es-en, en-es, ru-en, mul-en and en-ROMANCE, or they are skipped.

Credits

See NOTICE for details. Parley itself is MIT licensed.

About

Offline chat translation for Minecraft 1.8.9 Forge and Lunar Client. No API keys, no rate limits.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages