Translate game dialogue with Ollama and Hy-MT3 without losing placeholders
Translate three fictional game lines locally with Tencent Hy-MT3, check the tokens, and save the reviewed lines as JSON.
Last updated
Menus and supported features can change. Compare the source-check date below with your current app version.

The English in a game dialogue file can read perfectly and still break the scene. If the translation drops {player_name}, the game may lose the spot where it inserts the player’s name. {count} is where a number will go, and the <b>…</b> pair marks a span of bold text. We’ll translate three lines from a fictional quest, check those details and save a small English JSON file.
Ollama runs models on your computer. Hy-MT3 is a translation model from Tencent with documented instructions for terminology, style and structured text. This setup is useful for getting a first draft when you already have the dialogue and want to keep the job local. I checked the instructions against official sources; I did not run the model or measure translation quality. The illustration is an original teaching aid. Tencent’s game benchmark for the larger model should not be read as a result for this 1.8B variant.
1. Open the model in Ollama
Download the installer for your operating system from the official Ollama download page. The steps here use Windows. Install Ollama, start the app and open a new PowerShell window. PowerShell is where you type instructions for the computer. Enter these two commands, one at a time:
ollama --version
ollama run hf.co/tencent/Hy-MT3-1.8B-GGUF:Q4_K_M
The first checks that the program can be called. The second selects the Q4_K_M variant from Tencent’s public Hugging Face repository and opens a local session. Hugging Face lists that weights file at around 1.35 GB. That value is not the total space used by the installation or the amount of memory required to run it. The first download needs internet access. There is no translation API key to enter for this route. Once you see the chat input prompt, you can start. Ollama and Hugging Face documentation
2. Start with three lines and a tiny glossary
Here are three fictional lines with predictable things to check. Use them before trying a real game file.
| ID | Speaker | Source |
|---|---|---|
| quest-01 | Mira | {player_name}, 잠깐! 문은 해가 지면 닫혀. |
| quest-02 | Mira | <b>별빛 조각</b>을 {count}개 가져와. |
| quest-03 | Guard | 남은 시간은 10분입니다. 서두르세요. |
Mira is a friend and can sound brisk. The guard should remain polite and direct. In the exercise, leave both speaker values and all the IDs unchanged. Translate the item name 별빛 조각 as Starlight Shard consistently.
3. Translate the dialogue, one line at a time
Paste the first line below into the Ollama prompt and press Enter. Keep just the translation for review. Repeat with the other prompts separately.
Translate this Korean game line into English. Keep {player_name} unchanged. Use a casual, urgent tone. Return only the translated line: {player_name}, 잠깐! 문은 해가 지면 닫혀.
Translate this Korean game line into English. Use Starlight Shard for 별빛 조각. Keep {count}, <b> and </b> unchanged. Return only the translated line: <b>별빛 조각</b>을 {count}개 가져와.
Translate this Korean game line into English. Keep the number 10. Use a courteous, firm guard voice. Return only the translated line: 남은 시간은 10분입니다. 서두르세요.
If a token has disappeared or a tag has no closing partner, fix that line before saving. The second line should still have <b>Starlight Shard</b>. In the third line, make sure 10 still refers to minutes. Read the first line aloud: it should sound like someone stopping a friend in a hurry, not like a dictionary entry.
4. Save and reopen your English JSON
Open Notepad and paste the template below. These English lines are editorial reference examples, not recorded model outputs. Replace only the contents of the text fields with your reviewed lines.
[
{"id":"quest-01","speaker":"Mira","text":"{player_name}, wait! The gate closes at sundown."},
{"id":"quest-02","speaker":"Mira","text":"Bring me {count} <b>Starlight Shard</b> pieces."},
{"id":"quest-03","speaker":"Guard","text":"You have 10 minutes left. Please hurry."}
]
Use File → Save As. Name the file quest-en.json, choose UTF-8, and use All files if you see a file type menu. That helps avoid a hidden .txt ending. Close and reopen the file. Check that all three IDs and both speaker names still match the original. Search for the two braces tokens, both bold tags and the number. If your writing includes quotation marks inside a line, escape them following JSON rules so you do not break the file structure.
This is a practice format, not a file that every game can import. When moving on to a real project, keep its original keys and format, use a copy and check the lines in a test build. A clean text file does not tell you whether a long line fits a narrow dialogue box.
If you get stuck
- PowerShell cannot find Ollama. Open a fresh PowerShell after installation and make sure the app is running.
- The model does not load. Check the exact repository name, the
Q4_K_Msuffix, your connection and available storage. If it has downloaded but still fails, read the runtime error before changing models. - The output includes an explanation. Copy only the translated line. Put any damaged tokens back exactly and check their positions.
- The voices sound the same. Keep a short note for each character with their relationship to the player, level of formality and recurring terms. Reuse it on the next group of lines.
For a broader introduction to how the app and a local model fit together, see the existing Ollama starter guide.