gitwtfhub

wtf is lunatranslator?

hillya51/lunatranslator — explained in plain English

Analysis updated 2026-06-24

11,480C++Audience · generalComplexity · 3/5LicenseSetup · moderate

TL;DR

A Windows app that translates visual novel text in real time while you play, using game hooking or OCR to capture text and routing it through your choice of translation engine.

Mindmap

mindmap
  root((LunaTranslator))
    Text Capture
      Game hook
      OCR engine
      Emulator hook
    Translation
      LLM APIs
      Machine translation
      Offline engines
    Extra Features
      Anki flashcards
      Text to speech
      Embedded text
    Supported Platforms
      PC visual novels
      Switch emulator
      PSP and PS2

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Play a Japanese visual novel with a live translation overlay without waiting for a fan translation patch.

REASON 2

Read emulated Nintendo Switch, PSP, or PS2 games with translated text captured from the emulator.

REASON 3

Study Japanese vocabulary while playing by using word segmentation and Anki flashcard export.

REASON 4

Have translated dialogue spoken aloud using text-to-speech while reading along.

What's in the stack?

C++WindowsPython

How it stacks up

hillya51/lunatranslatoropenalpr/openalprquipnetwork/cpp-sdk
Stars11,48011,40011,612
LanguageC++C++C++
Setup difficultymoderatemoderatehard
Complexity3/53/55/5
Audiencegeneraldeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Windows. Translation quality depends on the engine you configure, some engines require API keys from external services.

Free to use and share, but any software you distribute that includes this code must also be released as open source under the same GPL license.

Wtf does this do

LunaTranslator is a Windows desktop application for translating text from visual novels in real time. It is aimed at players who want to read Japanese visual novels (or games in other languages) while having a translation displayed alongside the game, without needing to modify game files or wait for fan translation patches. The primary method for extracting text is HOOK, a technique that intercepts the game's text output at the system level. The README states this is compatible with nearly all common and obscure visual novel titles. For games running on emulators covering Nintendo Switch, PSP, Vita, and PS2, LunaTranslator can hook directly into the emulator to read text without running the game natively on PC. For games where HOOK does not work, LunaTranslator includes OCR support with a built-in high-precision model, and connections to many additional online and offline OCR engines. Once text is captured by any method, it can be routed to a wide range of translation engines, including large language model APIs, offline translation tools, and conventional machine translation services. Additional features include embedded translation (injecting the translated text directly into the game display for a more immersive experience), Japanese word segmentation with kana pronunciation annotation for language learners, integration with Anki for vocabulary study via AnkiConnect, text-to-speech output through multiple engines, and speech recognition on Windows 10 and Windows 11. The software is licensed under GPLv3 and the project accepts sponsorships via Patreon.

Yoink these prompts

Prompt 1
I want to play a Japanese visual novel on PC with LunaTranslator. Walk me through setting up the HOOK text extraction and connecting it to a translation engine.
Prompt 2
The visual novel I am playing does not work with LunaTranslator's hook method. How do I set up OCR mode to capture text from the screen instead?
Prompt 3
I am playing a PS2 game in an emulator and want LunaTranslator to translate the text. How do I connect it to the emulator?
Prompt 4
How do I set up LunaTranslator to send new Japanese words to Anki automatically using AnkiConnect so I can review them later?
Prompt 5
Configure LunaTranslator to inject the translated text directly into the game window instead of showing it in a separate overlay panel.

Frequently asked questions

wtf is lunatranslator?

A Windows app that translates visual novel text in real time while you play, using game hooking or OCR to capture text and routing it through your choice of translation engine.

What language is lunatranslator written in?

Mainly C++. The stack also includes C++, Windows, Python.

What license does lunatranslator use?

Free to use and share, but any software you distribute that includes this code must also be released as open source under the same GPL license.

How hard is lunatranslator to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is lunatranslator for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.