Menu

How to ship a daily web app in more than one language (and where the fallback quietly breaks)
📰

How to ship a daily web app in more than one language (and where the fallback quietly breaks)

DEV Community: javascript·Thiago Longo Moraes·about 8 hours ago
#r4xhZz0V
#devtojavascript#devto#dev#locale#every
Reading 0:00
15s threshold

Your i18n works perfectly in the language you test in.

The bugs live in the fallback: the place your app goes when a translation is missing and nobody notices.

Apps with daily content (a daily prompt, a daily habit card, a daily puzzle) have an extra twist: every day is new content that must exist in every language, at the right moment, in every time zone. Here are the six places I'd check first, using a fictional habit app called Dailyish as the example.

1. The silent fallback

Most i18n libraries fall back gracefully: if de-AT is missing a key, try de , then the default language. That's good. The problem is that it's silent .

A German-speaking user sees one English button among German ones. Nobody files a bug. You never find out.

Fix: log every fallback in development and staging, and count them in production.

function t ( key , locale ) { for ( const loc of fallbackChain ( locale ) ) { const value = messages [ loc ] ? .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.