Skip to content

Pick your style: Denkbaar

Book a conversation

Articles

Knowledge

A site in fourteen languages: how to approach i18n

Multilingual is not a translation job at the end. It starts with how you set up your code: no text in the code, keys per area, and every language tested.

Three colleagues compare a website on different screens.
A multilingual site starts with a good structure. Illustration: Denkbaar.

This site exists in fourteen languages, from Dutch and English to Japanese, Amharic and Afaan Oromo. With AI, translating is fast. The work is in the setup: if text is stuck in the code, every new language becomes a job.

Plain technical English i18n (internationalisation) means: you set up your code so that every text comes from a translation file. Each text has an English key, and each language has a file with the translations. The browser handles plurals and dates per language with Intl.PluralRules and Intl.DateTimeFormat.

Why it matters

Customers prefer to read in their own language. But a site that you keep up by hand per language soon gets out of step: a button that is still English in German, a date in the wrong format. With a good setup, you add a language without touching the code, and a test shows at once what is missing.

A page design lies beside a key and separate folders.
Each language gets its own translation file. Illustration: Denkbaar.

How it works

Code with keys, no text

Source file in Dutch

Agent translates per language

Person checks

Test: is a key missing?

Build of all languages

The code only contains keys; an agent translates the source file, a person checks, and a test and the build catch what is missing.

Two screens show the same layout in opposite directions.
Also prepare a layout that runs from right to left. Illustration: Denkbaar.

What you do

  1. Never text in the code. Every text a user sees comes from a translation file.
  2. English keys, one file per area per language. We use i18next, with flat keys such as contact.hero.title.
  3. Choose a source language and a fallback. Our source language is Dutch. If a key is missing, the site falls back to English, and then to Dutch.
  4. Plurals per language. Not every language only has “one” and “more”. Polish has extra forms; for those we use _one, _few, _many and _other. Intl.PluralRules picks the right form.
  5. Dates and numbers with Intl, never put together by hand.
  6. Prepare for right-to-left. For Arabic or Hebrew, the W3C says to put dir="rtl" on the html element. In CSS, use logical properties, such as margin-inline-start instead of margin-left; then the layout turns with it by itself.
  7. Watch language rules. Japanese and Chinese put no space between sentences. Turkish has a capital İ with a dot, which search must take into account.
  8. Translate with an agent, check by a person. Fix set phrases and brand names, so that the agent does not translate them again.
  9. Test every language. On our site, npm run check:i18n fails when a key is missing, and CI builds all fourteen languages.

What we can do with you: we make your site or app multilingual, with a setup in which you add a language without a programmer. Book a conversation.

Sources

  1. MDN: Intl.PluralRules
  2. MDN: Intl.DateTimeFormat
  3. MDN: CSS logical properties and values
  4. W3C: Structural markup and right-to-left text in HTML

Topics: i18nlanguagesfrontend