A holiday let with guests from abroad, a shop near the border, a charity serving several communities: plenty of small organisations want their website in more than one language. There are two broad ways to do it, and they differ in what every visitor downloads, in how search engines see the result and in how well screen readers cope. This article compares them and explains the bits of markup that hold a multilingual site together.
Two ways to offer other languages
- Separate translated pages. Each language has its own address, for example
/fr/contactalongside/contact. The translated text is part of the page itself, written or reviewed by a person, and a language switcher links between versions. - A client-side translation widget. A script added to every page shows a language menu and rewrites the text in the visitor's browser, typically using machine translation. There is one address per page, whatever the language.
Some multilingual plugins for content management systems create separate pages; others work like a widget. Check which kind yours is. What matters here is where the translation lives: in the page, or added afterwards in the browser.
What a translation widget adds
A widget's script, styles and menu icons usually load on every page, for every visitor, including those who read the page in its original language. GreenTracer measures one initial, uncached load of the page with Google PageSpeed Insights, so whatever the widget downloads at that point is part of your result. Anything fetched only after someone picks a language isn't part of that first load.
It is also worth knowing that visitors may already have a translator. Chrome, for example, can translate a page into other languages from the address bar, without anything added to your site. If your widget does much the same job, it may be worth asking what it adds for the visitors who need it.
To see what yours costs, open the page with Chrome DevTools' Network panel, tick “Disable cache”, reload, and filter by the widget provider's domain. Our guide to checking your page weight walks through the panel, and finding unused JavaScript helps if you suspect the script is mostly idle.
Why search engines prefer separate pages
Google's guidance on multilingual sites recommends using different URLs for each language version of a page, rather than switching the language with cookies or browser settings. A widget that swaps text on a single address gives search engines one version to find. The same guidance says:
- Google works out a page's language from its visible content, not from code such as the
langattribute or the URL. - Keep the content and navigation of each page in one language.
- Don't redirect visitors automatically based on their assumed language. Link to the other versions and let people choose.
If you use machine translation to create separate pages, have someone review them. Google's spam policies define scaled content abuse as generating many pages of little value to users, “no matter how it's created”, and give automated translation of scraped content as one example.
hreflang in plain terms
Once each language has its own page, hreflang tells search engines which pages are versions of each other. Google's hreflang documentation sets out the rules:
- Add the links in the page head, in HTTP headers or in your sitemap. Pick one method; using more than one brings no benefit.
- Each version lists itself and every other version. If two pages don't both point to each other, the tags are ignored.
- Use full addresses including
https://, and a language code with an optional region, such asenoren-GB. A country code on its own isn't allowed. - Add
x-defaultfor the page to show when no language matches the visitor's browser.
<link rel="alternate" hreflang="en-GB" href="https://example.com/contact">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/contact">
<link rel="alternate" hreflang="x-default" href="https://example.com/contact">These are a few short lines of text in the page head, not an extra download. If you use a multilingual plugin, ask your web person to confirm that it writes these tags and that every version points back.
Tell browsers the language too
Although Google doesn't use it to detect language, the lang attribute still matters. MDN's page on the lang attribute explains that it lets screen readers use the correct pronunciation, and that WCAG asks for the page language, and any passage in a different language, to be marked up. Each translated page should set its own language, for example <html lang="fr">, and a French phrase quoted on an English page can be wrapped with lang="fr".
One related attribute is useful whichever approach you take. MDN's page on translate says translate="no" is respected by automatic translation systems such as Google Translate, which is handy for a business or product name that shouldn't be translated.
Choosing for a small site
- Translate what people need, not everything. Separate pages for your home, services, prices and contact details may serve visitors better than a widget covering hundreds of old blog posts.
- If you keep a widget, consider loading it only when someone opens the language menu, and check whether it runs on pages that don't need it.
- Link the versions clearly with a language switcher that uses each language's own name, such as “Français”.
After any change, check the page again and compare with the earlier report. Check one of the translated pages too: it is a page in its own right, with its own weight.
Sources
- Google Search Central: managing multi-regional and multilingual sites
- Google Search Central: tell Google about localised versions of your page (hreflang)
- Google Search Central: spam policies (scaled content abuse)
- MDN: the lang global attribute
- MDN: the translate global attribute
- Google Chrome Help: change Chrome languages and translate webpages



