How to Localize Your App — Externalize the Strings, Let AI Translate
00要約Overview
01物語Story
Situation
As set out in 1.2, the first goal is two languages. The first thing to touch is the app's display strings.
Complication
But if strings are hard-coded into every screen, replacing them per language later becomes hell. You end up hunting for text across the codebase, touching every screen for every language you add.
Question
How do you structure display strings so localization stays cheap?
02解決Solution
Criteria
- Display strings live in one place
- AI can translate them wholesale
- Adding a language later is easy
Answer
Pull the display strings out as "language files." Code references keys, not the strings themselves; the actual wording lives in per-language files. Translation then is just handing the file to AI: "translate this language file into X." You still do the final review, but AI finishes most of it.
Reason
Because when strings live in one place, translation and replacement happen once. Scattered through the code, even AI can't tell what to translate, and every added language means touching every screen. Collected into a language file, AI translates in one pass, and adding a language means adding one file.
What matters is not the translation technique.
It is implementing a localization-friendly structure from the start.
One pitfall, though. Hand AI only keys and values, and it can't tell what screen a word lives on or what it means — is "Home" a house, or the first screen? So attach a comment to each string: which screen, and what for. That context decides most of the translation quality.
Options
- Hard-code strings into screens — fastest at first, but come localization day you touch every screen. So, not taken.
- Call a machine-translation API each time — weak on context, more mistranslations, and an ongoing cost. Having AI translate whole files with context wins on quality.
03結果Result
Good
Once the structure is right, two languages scale straight to five, or fifty. The steps stay the same; only the number of language files grows. The vast, unglamorous translating is now AI's job.
Bad
AI, too, mistranslates without context. Domain terms and wordplay need special care, and the final review can't be skipped. Preparing structure and context remains human work.
Follow-up
With the app localized, next comes the store listing that carries it into the world. Continued in 1.2.2 How to localize your store listing.