multilingual websites
web development
website localization
language best practices
international user experience

Best practice multi language website

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

A multilingual website is not just a translated copy of the same pages. Good internationalization combines URL design, content localization, search engine signals, formatting rules, and editorial workflow so users see the right language and region-specific details without confusion.

Separate Internationalization from Translation

The first design step is understanding the difference between:

  • internationalization, often shortened to i18n
  • localization, often shortened to l10n

Internationalization is the technical foundation that makes multiple locales possible. Localization is the actual language and region adaptation: translated text, date formats, currencies, examples, and cultural choices.

A project usually fails when it mixes those concerns. Hard-coded strings, inline date formatting, and language-specific assumptions make translation expensive later.

URL and Locale Strategy

Your URL structure should make language choices explicit and stable. Common approaches are:

  • subdirectories such as example.com/en/
  • subdomains such as fr.example.com
  • country-specific domains when the business model justifies them

Subdirectories are often the simplest operationally because deployment, analytics, and SEO are easier to centralize.

Avoid storing the selected language only in JavaScript state. Each localized page should have its own address so users can bookmark, share, and index it properly.

Managing Translations in Code

A small dictionary-based approach is enough to illustrate the idea:

javascript
1const messages = {
2  en: {
3    heading: "Welcome",
4    cta: "Start free trial",
5  },
6  fr: {
7    heading: "Bienvenue",
8    cta: "Commencer l'essai gratuit",
9  },
10};
11
12function renderHome(locale) {
13  const copy = messages[locale] ?? messages.en;
14  return `
15    <h1>${copy.heading}</h1>
16    <button>${copy.cta}</button>
17  `;
18}
19
20console.log(renderHome("fr"));

Real systems usually use a framework-level i18n library, but the structure is the same: a locale key maps to translated content, and the application selects the right copy based on routing or user preference.

Format Data with Locale-Aware APIs

Translation is only part of localization. Numbers, dates, times, and currencies also need locale-aware formatting.

javascript
1const price = 1299.5;
2const releaseDate = new Date("2026-03-11T12:00:00Z");
3
4console.log(new Intl.NumberFormat("en-US", {
5  style: "currency",
6  currency: "USD",
7}).format(price));
8
9console.log(new Intl.NumberFormat("de-DE", {
10  style: "currency",
11  currency: "EUR",
12}).format(price));
13
14console.log(new Intl.DateTimeFormat("ja-JP", {
15  dateStyle: "long",
16  timeStyle: "short",
17  timeZone: "UTC",
18}).format(releaseDate));

This avoids the common mistake of translating labels but leaving all other data in a single market's format.

SEO and Language Discovery

Search engines need explicit hints about alternate language versions. That usually means:

  • unique URLs per locale
  • correct page language declarations
  • 'hreflang annotations'
  • self-consistent canonical tags

Automatic browser-language redirects should be used carefully. A soft suggestion is usually better than a forced redirect because users may intentionally browse in a different language.

Content and Design Considerations

Localized content expands and contracts. German strings may be longer than English ones. Arabic and Hebrew require right-to-left layout support. Support teams may also need region-specific legal text, shipping information, or tax behavior.

Good design choices include:

  • flexible component widths
  • avoiding text baked into images
  • testing layouts with long translations
  • supporting locale-aware typography and directionality

A multilingual website is a content system problem as much as a front-end problem.

Common Pitfalls

One common error is treating English as the only "real" locale and adding hacks for every other language. That leads to missing translations and inconsistent formatting.

Another issue is translating page text while leaving forms, validation messages, emails, and transactional screens in the default language. Users experience the whole product, not just the marketing pages.

Teams also underestimate editorial workflow. If translators do not have context, strings become awkward or inconsistent. Translation keys should be stable and descriptive, and release processes should account for new copy.

Finally, avoid automatic machine translation as the final user-facing layer for important business, legal, or support content. It can help draft content, but it is not enough for quality localization on its own.

Summary

  • Build multilingual sites with explicit locale routing, not hidden client-side state only.
  • Separate internationalization infrastructure from localization content work.
  • Format numbers, dates, and currencies with locale-aware APIs.
  • Plan for SEO using distinct URLs and language metadata.
  • Treat localization as a product workflow, not just a text replacement task.

Course illustration
Course illustration

All Rights Reserved.