Translate your app without a redeploy
5 min read

Translate your app without a redeploy

Fixing a word in a translation shouldn't need a deploy. How to load translations at runtime, keep fallbacks so nothing renders blank, and let missing keys report themselves.

If you ship an app in more than one language, you probably know the routine: translations live in JSON files in the repo, so a typo in one text means a commit, a build and a deploy. A new language means copying a file, sending it to someone, and pasting their changes back by hand. And you only find out a key is missing when a user sees checkout.confirm.title on the screen.

None of that is hard. It's just friction, and friction is what makes a solo developer put off fixing copy. This post is how to move translations out of the codebase and into Pullwish, and the small habits that keep them in shape.

Why translation files in the repo get in the way

Keeping translations in the repo works fine on day one. The problems show up later:

  1. Every text change is a deploy. Fixing one word goes through the same pipeline as a code change.

  2. Missing keys are invisible. Nothing tells you a key has no translation until someone reports it, or doesn't.

  3. Translators need the repo. Or you end up as the copy-paste layer between a spreadsheet and your JSON files.

  4. Everything ships to everyone. The admin screens' strings are bundled for users who never open the admin area.

Load translations at runtime

Pullwish has a Translations section in the dashboard and a small client, @pullwish/i18n, that loads them into your app. You add your keys and per-locale texts in the dashboard, and the app fetches them by locale:

import { PullwishI18n } from "@pullwish/i18n";

const i18n = new PullwishI18n({
  apiKey: process.env.NEXT_PUBLIC_PULLWISH_API_KEY!,
  projectId: process.env.NEXT_PUBLIC_PULLWISH_PROJECT_ID!,
  locale: "nb",
  fallbackLocale: "en",
});
await i18n.init();

i18n.t("nav.home"); // "Hjem"

The API key only needs the public:read permission, which you set when you create it under Settings → API Keys. Since this key lives in the browser, I give the translation client its own key with just that permission.

On repeat visits, init() renders straight from the copy cached in localStorage and then checks the server for a newer version. Because the texts aren't baked into the build, fixing a word in the dashboard doesn't need a deploy. The translations API is served from a CDN cache for up to 15 minutes, so a change shows up within that window rather than instantly, which is fine for copy.

Fallbacks so nothing renders blank

The part I care most about is what happens when a key is missing. t() takes a fallback text as its second argument:

i18n.t("checkout.confirm.title", "Confirm your order");

If the key is missing in the active locale, the client tries the fallbackLocale. If it's missing there too, it shows the fallback text. As a last resort it shows the key itself, so the screen is never blank.

And the client tells you about it. With reportMissingKeys on (the default), missing keys are sent to Pullwish in batches and created in the dashboard automatically, using the fallback text from t() as the default text. So the habit becomes: write the English text inline as the fallback while you build, ship, and the keys show up in the dashboard waiting for translations. During local development, turn reportMissingKeys off so experiments don't create keys.

Plurals and variables without string glue

Building sentences by concatenating strings breaks down the moment a second language shows up. The client supports {{variable}} interpolation and ICU plural forms, stored as the translation value in the dashboard:

// Dashboard value: "You have {count, plural, one {# item} other {# items}}"
i18n.t("cart.items", undefined, { count: 1 }); // "You have 1 item"
i18n.t("cart.items", undefined, { count: 5 }); // "You have 5 items"

Plural rules follow the CLDR categories (zero, one, two, few, many, other), so languages with more than two plural forms work too.

Switch languages and load only what you need

Switching language at runtime is one call, and preload() warms the cache first so the switch doesn't flash:

await i18n.preload("en");
await i18n.setLocale("en");

onChange() lets you re-render a React tree when the locale or translations change. For bigger apps, keys can belong to a namespace. Set namespace: "common" and only those keys load on start, then call loadNamespace("admin") when someone actually opens the admin area.

For Next.js, createServerI18n() fetches translations in a Server Component, with a 5-minute revalidation window by default. You pass its translations to the client as initialData, so the browser doesn't fetch the same texts a second time.

Keep translations moving with MCP

Because the keys live in Pullwish, they're also available through Pullwish's MCP. In Cursor, you can ask for every key that's still missing a translation in a given locale (list_translation_keys with a missing-locale filter), and add or fill in translations in bulk (upsert_translation_keys). Existing texts are left alone unless you explicitly ask to overwrite them, so a bulk run can't silently replace copy you've already fixed by hand.

In the dashboard, keys are grouped by their dotted prefix (nav.home sits under nav), with translation coverage per group, which makes it easy to spot the section that's falling behind.

What it costs

Translations (i18n) are included on Indie (€19/month), Startup (€49/month) and Business (€99/month with 5 team members included, extra members €15/month each). The free Hobby plan doesn't include translations. New accounts get Indie free for 14 days, with no card required. All prices are VAT included.

The short version

Get the texts out of the build. Load them at runtime, always pass a fallback, let missing keys report themselves, and use plural rules instead of string glue. Fixing a word should take seconds, not a deploy.

The full setup, including the React and Next.js examples, is in the @pullwish/i18n docs at docs.pullwish.com.

AI Disclaimer: This article was drafted with AI assistance. I reviewed, edited and fact-checked it against the product before publishing.