◉RORK LABJP
●MCP — Rork now lets you add and manage your own MCP servers inside Plugins (11/21)●2.5 ROUTE — From 12/1, apps calling gemini-2.5-flash are routed to 3.5 Flash-Lite and billed at its rates (9 days left)●CHANNEL — Users report Android notification channel reads and writes failing in Expo Go●NEW — New: three clues to check before replying to a stuck-on-splash review●EXPORT — Export your projects before you downgrade or cancel a plan●SONNET 4.5 — Apps that call Sonnet 4.5 through the API should switch before it retires on 11/30●MCP — Rork now lets you add and manage your own MCP servers inside Plugins (11/21)●2.5 ROUTE — From 12/1, apps calling gemini-2.5-flash are routed to 3.5 Flash-Lite and billed at its rates (9 days left)●CHANNEL — Users report Android notification channel reads and writes failing in Expo Go●NEW — New: three clues to check before replying to a stuck-on-splash review●EXPORT — Export your projects before you downgrade or cancel a plan●SONNET 4.5 — Apps that call Sonnet 4.5 through the API should switch before it retires on 11/30
Articles/AI Models
◉ AI Models/2026-11-14Beginner

I asked Rork for the same screen in Japanese and in English — three things about UI text to decide before you prompt

Prompting Rork for the same settings screen in Japanese and in English, the real differences were not visual. They were where the text lives, how long it is allowed to be, and how dates are formatted. Here are three constraints to add to any prompt, a copy-ready prompt, and a script that lists hard-coded strings.

PromptingLocalization9Japaneseexpo-localizationRork620

I was rebuilding the settings screen of my wallpaper app one evening, and I sent Rork the same request twice: once in Japanese, once in English. I expected to compare colors and spacing.

That is not what caught my eye. The Japanese version had short labels like "保存" (save) typed straight into each screen's code. The English version had longer labels like "Save changes" squeezed into buttons with a fixed width.

What I'd like to share first is this: deciding where the text lives, how long it may grow, and how dates and numbers are written matters more than which language you prompt in. It is less about picking a language and more about taking back the parts I had quietly left to it.

Side by side, three places differed

After sending the same request in both languages a few times, these were the places where the results tended to drift for me. Each generation varies, so please read this as "tends to lean this way," not as a rule.

What to look atPrompted in JapanesePrompted in English
Where text livesOften hard-coded in each screenAlso hard-coded, and adding Japanese later is rarely planned for
Length assumptionsWidths sized for very short wordsSized for long words; Japanese leaves empty space
Dates and numbersFormats like "11月14日" built by string concatenation"Nov 14" assumed, even on a Japanese device

Neither language won. The prompt language simply slips in as the app's "first language." That is natural enough. The trouble starts on the day you add a second one.

Length changes by several times across languages

Button labels show it most clearly. "保存" is 2 characters, "Save changes" is 12, and the German "Änderungen speichern" is 20. As an indie developer who keeps store listings in many languages, I run into this stretch and shrink every release.

A screen built from a Japanese prompt usually settles on a width for 2 characters, so English text gets cut off or wraps later. A screen built from English leaves Japanese buttons looking hollow. Either way, telling Rork not to hard-code widths in the first prompt saved me the most time.

I've written separately about Japanese line breaks and about bold Japanese text on Android (The Comma That Fell to the Start of a Line: Rork, Quote Cards, and Japanese Line Breaking, Japanese Headings Won't Turn Bold on Android: How to Trace and Fix a fontWeight That Does Nothing). Here I'll stay with the step before that: how the prompt is written.

At first I thought it was just how the model behaves

I'll admit I first assumed English prompts would return "cleaner" code, and I leaned on English for a while. It didn't go well. All it got me was a pile of English labels hard-coded across screens, waiting to be replaced by hand.

It clicked while I was fixing the same "Cancel" label in one file after another. This wasn't a quirk of generation. I had simply never asked for the text to live in one place.

Where the text lives is decided in the first prompt, not left to the prompt's language. That one line is now the first thing I check whenever I ask for a new screen.

Add three constraints to the prompt

Rork's own docs suggest pairing the experience you want with clear constraints (How to prompt successfully). For UI text, three lines were enough for me. Whether you write them in English or Japanese, the gap between the two results gets much smaller.

Build a settings screen. Calm mood, one main flow only.
For all UI text, follow these three rules:
1. Put every visible string in constants/strings.ts with both ja and en. Never hard-code text in components.
2. Do not give buttons or labels a fixed numeric width. The layout must survive text that is 3x longer.
3. Never build dates, numbers or prices by string concatenation. Format them with Intl for the device language.

The first line follows the official advice about mood and scope. The rest is what I took away from the comparison.

Check that the returned code looks like this

When the prompt is followed, the text ends up roughly like this. The device language comes from getLocales() in expo-localization. The Expo docs note that languageCode can be null, and that on Android a user can change the language in Settings without the app restarting (Localization - Expo Documentation). So I keep the language check in one place and always leave a fallback to English.

// constants/strings.ts
import { getLocales } from "expo-localization";
 
const strings = {
  ja: { save: "保存", cancel: "キャンセル", lastUpdated: "最終更新" },
  en: { save: "Save changes", cancel: "Cancel", lastUpdated: "Last updated" },
} as const;
 
type Lang = keyof typeof strings;
type Key = keyof (typeof strings)["en"];
 
// languageCode can be null, so always fall back to en
export function currentLang(): Lang {
  const code = getLocales()[0]?.languageCode ?? "en";
  return code in strings ? (code as Lang) : "en";
}
 
export function t(key: Key): string {
  return strings[currentLang()][key];
}
 
// Let each locale decide the date format instead of building strings
export function formatDate(date: Date): string {
  const tag = getLocales()[0]?.languageTag ?? "en-US";
  return new Intl.DateTimeFormat(tag, { year: "numeric", month: "short", day: "numeric" }).format(date);
}

getLocales() is read on every call so that, after a language change on Android, the screen doesn't keep showing the old language. If that ever feels too frequent, re-reading it only when the app returns to the foreground is enough.

Count the hard-coded strings yourself

Even with the rule in the prompt, hard-coded text can creep back in over many edits. Run this from the root of an exported project to list strings written directly inside JSX. It needs only Node, no extra packages.

// scripts/find-hardcoded-strings.mjs
// Usage: node scripts/find-hardcoded-strings.mjs app components
import { readdirSync, readFileSync, statSync } from "node:fs";
import { join } from "node:path";
 
const roots = process.argv.slice(2).length ? process.argv.slice(2) : ["app", "components"];
// Catch >text< and strings passed directly to title= / placeholder= / label=
const patterns = [
  />\s*([^<>{}\s][^<>{}]*?)\s*</g,
  /\b(?:title|placeholder|label|accessibilityLabel)=["']([^"']+)["']/g,
];
 
function walk(dir, out = []) {
  let entries = [];
  try { entries = readdirSync(dir); } catch { return out; }
  for (const name of entries) {
    if (name === "node_modules" || name.startsWith(".")) continue;
    const p = join(dir, name);
    if (statSync(p).isDirectory()) walk(p, out);
    else if (/\.(tsx|jsx)$/.test(name)) out.push(p);
  }
  return out;
}
 
let total = 0;
for (const file of roots.flatMap((r) => walk(r))) {
  const lines = readFileSync(file, "utf8").split("\n");
  lines.forEach((line, i) => {
    for (const re of patterns) {
      for (const m of line.matchAll(re)) {
        const text = m[1].trim();
        // Skip symbols-only and numbers-only matches
        if (!/[A-Za-z぀-ヿ一-鿿]/.test(text)) continue;
        total++;
        console.log(`${file}:${i + 1}  ${text}`);
      }
    }
  });
}
console.log(`\nHard-coded candidates: ${total}`);
process.exitCode = total > 0 ? 1 : 0;

It's only regular expressions, so it will sometimes catch a type annotation by mistake. Still, watching the count fall toward 0 was a good enough way to track the cleanup. Paste the list into Rork and ask it to move those strings into constants/strings.ts; that goes far faster than editing by hand.

For catching missing translations as you add more languages, see Why Untranslated Strings Leak to Production Every Time You Add a Language — A Catalog and Gap-Detection Design for Rork (Expo) Apps.

So which language should you prompt in?

These days I write prompts in Japanese, the language I think in most easily, and always add the three lines above. When I'm describing mood and feel, my own strongest language keeps the intent from drifting.

If an app ships only to English-speaking stores, prompting in English does let you reuse the generated labels more often. What bridges the two, I think, is not the prompt language but the constraints you attach to it.

Next time you ask for a new screen, try adding just one line at the end: "Put all text in constants/strings.ts with ja and en." That alone removes one chore from the day you add a second language.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

◉ AI Models2026-11-19
Your GPT-6 Astra Became 6.2 Overnight: Three Checks Before You Rebuild Anything
Since November 18, Rork projects that had GPT-6 Astra or GPT-6.1 Sol selected now build with the 6.2 versions at the same effort. If the answers suddenly feel different, here are three checks to run before rebuilding a screen, plus a small yardstick request for measuring the change.
◉ AI Models2026-10-29
Connected, but the Body Stops Halfway. Measuring Header-Only, Total, and Idle Timeouts on the Same Response
You added a timeout to fetch, yet the loading indicator never goes away. I reproduced a response whose body stalls halfway on a local server and measured header-only, total, and idle timeouts under identical conditions. Runnable test code included.
◉ AI Models2026-10-27
Remembering What the AI Decided: Four Marks in the Cache Key Paid Off on Model-Swap Day
A small on-device cache for AI answers, with the model name and prompt version in the key so old answers vanish on swap day. TypeScript plus simulated results.