Files
MC-SurvivalWiki-Tips/tips/2026-07-21-040-i18n-add-english-ui-translation.md

23 lines
1.2 KiB
Markdown

---
tip_number: 40
date: 2026-07-21
category: i18n
status: pending
---
# Tip #40 — Add English UI translation
**Date:** 2026-07-21
**Category:** i18n
**Source:** MC-Survival Wiki Daily Tip (cron @ 18:00 MESZ)
## Add English UI translation
Mirror the existing German translation files into an en.json with the same structure, then add a locale switcher in the header so non-German visitors can switch languages. It solves the immediate bounce problem: non-German-speaking players and potential contributors hit the wiki and leave within seconds when every nav label is in a language they do not read. The signal is audience composition — the GitHub repo and the server's English-speaking community are both larger than the German-only UI suggests. Translating only the most-seen strings (nav, search, errors, buttons) is enough to flip the bounce rate; the long tail can be translated later or fall back to German.
## Implementation tips
1. Create en.json mirroring the structure of the existing de.json (or whatever the source is in i18n.ts).
2. Translate the most-seen UI strings first: nav, search, error messages, button labels — not the long-tail.
3. Add a locale switcher in the header (already a common shadcn pattern).