Insights

Designing for many languages from day one

Bolting translations on after launch breaks a multilingual site. Per-language URLs, hreflang, the lang attribute, text expansion and translation sync: 6 layers to plan from day one.

When a company takes a product abroad, a common plan is to build in one language first and add English later. But going multilingual is more than slotting in translations. URL structure, how you signal languages to search engines, how wide your layout is and what happens to translations when the original changes are all expensive to change after the fact. This article splits a multilingual site or service into 6 layers and goes through what is worth deciding at the start.

  1. 01
    Copy and imagesTranslated text, plus photos and examples chosen per language
  2. 02
    LayoutWidths and spacing that allow for longer translations
  3. 03
    FormatsDates, numbers, currency and name order per language
  4. 04
    Language signalslang attribute and hreflang tell machines the language
  5. 05
    URL structureA separate URL for each language
  6. 06
    Source and translationsTranslations catch up when the source changes
Fig.The 6 layers behind a multilingual site or service, from what users see at the top to the foundations at the bottom

The lower the layer, the harder it is to change

In the figure, the top is what users see and the bottom is the foundation. Upper layers are fairly easy to fix after launch. Lower layers get harder.

You can reword a translation whenever you spot a problem. Change your URL structure midway, though, and every page address that search engines have indexed and every inbound link moves at once. Replacing the system that manages source text and translations is also painful once you have many pages.

So even if you launch in a single language, we recommend deciding the bottom two layers as if the site were already multilingual.

URL structure: one URL per language

Google’s search guidance recommends using a different URL for each language version of a page. It advises against keeping one URL and switching the language with cookies or browser settings. It also advises against automatically redirecting users based on a guess about their language, because that can stop both users and search engines from reaching every version.

There are several ways to split URLs: country-code domains, subdomains and subdirectories, each with trade-offs. Subdirectories are described as easy to set up and low maintenance. Using URL parameters for language is not recommended.

This site, creativepunx.com, is built in 8 languages. English sits at the root, and Japanese, French, Spanish, Italian, Greek, German and Russian sit in subdirectories such as /ja/ and /fr/. Only the home page picks a starting language, from a choice the visitor made before or from their device’s language setting. Any other page opens in the language of its URL and never redirects, so a shared link always shows what the sender meant. The language switch is in the footer.

Language signals: hreflang and the lang attribute

Once each language has its own URL, you need to tell machines that other versions exist.

According to Google, there are 3 ways to do this: an HTML <link> element, an HTTP header or an XML sitemap, and all are treated the same. What matters is that each language version lists itself and every other version. If two pages do not point to each other, the annotations are ignored. Languages use ISO 639-1 codes, optionally followed by an ISO 3166-1 Alpha 2 region code. You can also set an x-default fallback for visitors whose language matches none of your versions.

Every page on this site carries hreflang links for all 8 languages plus x-default.

The page itself should also declare its language with the lang attribute. This is not only for search. Success criterion 3.1.1, Language of Page, in WCAG, the international web accessibility standard, requires that the default human language of each page can be programmatically determined. It sits at Level A, the most basic level. Screen readers use this declaration to switch pronunciation.

Layout and formats: translations get longer

Pour English or German text into a screen designed around Japanese and buttons and headings often overflow.

The W3C Internationalization article on text size gives rough expansion figures for translating English into European languages. Source text of up to 10 characters can grow to 200–300%, while text over 70 characters grows to around 130%. The shorter the text, the more it expands, so menus and buttons need the most room. The article recommends layouts that let text reflow, avoiding small fixed-width boxes, and separating presentation from content so font sizes and line heights can be adjusted per language. It also warns against abbreviating text to make it fit, since other languages may not be able to abbreviate the same way.

Formats differ by language too. Date order, number separators, currency and the order of family and given names should all be switched per language in the code that builds the text, not hard-coded.

Copy and images: translation alone does not land

The top layer is the text people read and the images they see. It works better to think of this as rewriting for readers of that language rather than translating. Something a Japanese reader takes for granted may need explaining to an international one. Names of laws and systems need an equivalent that makes sense in the target language.

Search terms need choosing again for each language as well. Translating your Japanese keywords word for word rarely matches what people in another country actually type. Page titles and descriptions land better when they start from the words readers of that language search for, not from the translation. Contact forms are similar: address and phone formats and the way name fields are split vary by country, and a form shaped around one country can be impossible to fill in for users elsewhere.

Images follow the same rule. Text baked into an image means recreating the image for every language. Put the words in HTML and keep the images free of text.

All of this rests on the bottom layer: managing source text and translations. Without a way to see which translations went out of date when the source changed, the languages drift further apart with every language you add.

Working with Creative Punx

The Creative Punx mission is “Carry every bold idea across borders.” We build from Japan, but not only for Japan. This site is itself built in 8 languages, and we designed and run its per-language URLs, hreflang and language switching ourselves.

For client work, one team takes on competitive research, UX design, UI design, development, and operations and maintenance. Multilingual design spans both design and engineering, so having one team look at both reduces rework.

Even if you plan to launch in one language, the lower layers can be built for many from the start. You can read how we run client projects at /services/build.

Sources

  1. Tell Google about localized versions of your pageGoogle Search Central
  2. Managing multi-regional and multilingual sitesGoogle Search Central
  3. Text size in translationW3C Internationalization
  4. Understanding Success Criterion 3.1.1: Language of PageW3C Web Accessibility Initiative

More insights

Building something bold?Let’s carry it across, together.