Localizing Large Codebases with LLMs: A Developer's Workflow for 4,500 UI Keys

✍️ OpenClawRadar📅 Published: March 2, 2026🔗 Source
Localizing Large Codebases with LLMs: A Developer's Workflow for 4,500 UI Keys
Ad

A developer documented their process for localizing a large game project with approximately 4,500 UI keys stored in a 500KB en-US.json file. They used a multi-step LLM workflow to handle extraction, translation, and quality improvement.

Initial Extraction and Translation Attempts

First, they used Claude to scan their codebase, extract hardcoded UI strings, and migrate them to i18n standards, creating the locale file. For translation to Italian, they initially tried Claude and Gemini Pro (via Gemini CLI and Antigravity). Both cloud models produced unacceptable quality translations. Gemini Pro also encountered errors with the large file, requiring it to be split into 10 smaller chunks.

Shifting to Local Models and the Context Breakthrough

They then tried TranslateGemma locally via LM Studio, translating key-by-key. While slightly better, the quality was still not acceptable. The key insight was that UI words are often ambiguous, and translation requires disambiguation and usage context.

To solve this, they went back to Claude to generate a second file. For each of the 4,500 keys, Claude inspected the code usage to provide context: where the string appears, its function (button label, description, input hint), and its effect in gameplay.

Ad

The Final Translation Pipeline

They built an automated translation pipeline with the following steps:

  • Batch keys together with their generated context.
  • Use a prompt focused on functional (not literal) translation.
  • Enforce placeholder and tag preservation.
  • Send requests to a local model through LM Studio.

TranslateGemma couldn't handle the context-heavy prompt format, so they switched models. They tested on an M1 Mac Mini with 16GB unified memory.

Model Performance and Results

Qwen 3 4B performed well, but Qwen 3 8B was the sweet spot, producing fewer grammar mistakes and better phrasing while remaining manageable to run locally. The final pipeline can translate the 4,500+ keys into multiple languages, taking roughly 8 hours per locale on their machine. They use a quantized model so they can continue working while it runs in the background.

The developer notes this approach produced quality good enough to ship and felt better than many auto-translated projects they've seen.

📖 Read the full source: r/LocalLLaMA

Ad

👀 See Also

Claude Code Used to Reverse Engineer Disney Infinity 1.0, Breaking 13-Year Character Restriction
Use Cases

Claude Code Used to Reverse Engineer Disney Infinity 1.0, Breaking 13-Year Character Restriction

A developer used Claude Code (Opus 4.6 with high reasoning) to reverse engineer the Disney Infinity 1.0 game binary, identifying and patching 13 validation call sites that prevented characters from playing in any playset. The solution required 17 binary patches and 3 modified data files, solving a problem the modding community had been unable to crack for over a decade.

OpenClawRadar
Developer Switches Business OpenClaw to RunLobster After Security Incident, Keeps Personal Instance Self-Hosted
Use Cases

Developer Switches Business OpenClaw to RunLobster After Security Incident, Keeps Personal Instance Self-Hosted

A developer moved their business OpenClaw agent to RunLobster at $49/month after discovering their self-hosted instance had been exposed on 0.0.0.0 for 3 months following the February CVE. They kept personal OpenClaw self-hosted on a Mac Mini for non-critical workloads.

OpenClawRadar
Researchers Use Claude Projects for Academic Scoping Review: Strengths and Limitations
Use Cases

Researchers Use Claude Projects for Academic Scoping Review: Strengths and Limitations

Researchers used Claude Projects to assist with a peer-reviewed scoping review of 39 qualitative interview studies on student experiences with GenAI in higher education. The tool showed specific strengths in cross-referencing themes and suggesting analytical categories, but required rigorous verification against source data.

OpenClawRadar
Autonomous AI employee built with OpenClaw deploys 3 products in 2 hours
Use Cases

Autonomous AI employee built with OpenClaw deploys 3 products in 2 hours

A non-developer created an AI employee named Cipher using OpenClaw that built 3 products, designed landing pages, deployed them live, created Stripe payment links, and tweeted the launch in 2 hours. The system runs 24/7 on a $32/month cloud server.

OpenClawRadar