ResourcesCreated · 6 min read

How Our Website Translates Itself Into 5 SA Languages

How the Net Age language switcher translates a whole page into Afrikaans, isiZulu, isiXhosa or Sepedi live, with caching, no duplicate pages and English as a safe fallback.

Voice

Every page on this site carries a "Change language" button. Press it and the whole page, headings, buttons, prices, paragraphs, redraws in Afrikaans, isiZulu, isiXhosa or Sepedi within a few seconds. No second website, no duplicated pages, no translation plugin. This article explains exactly how it works, because the approach is reusable on any site we build.

The five languages on offer

The picker offers English (the source language), Afrikaans, isiZulu, isiXhosa and Sepedi. Each one is listed in its own name first, with the English name beside it, so a visitor recognises their language without having to read English to find it.

Nothing is pre-translated

The usual approach to a multilingual site is to keep a separate copy of every page for every language, then hire someone to keep all of them in step. On a site with hundreds of pages and prices that change, that becomes an admin job nobody wants.

Instead, our translation happens live, in the visitor's browser, against the page they are already looking at. The English page stays the single source of truth. Change a price once and every language shows the new price, because there is no second copy to forget about.

Step one: find the words, ignore the code

When a language is chosen, the page is walked from top to bottom and every piece of visible text is collected. Only real text is picked up. Skipped automatically are scripts and styles, code samples, images, icons, form inputs and anything a visitor is typing into.

Anything we never want translated, brand names, the language menu itself, a product code, can be marked to be left alone and the walker steps straight past it. Numbers, links, email addresses and proper nouns are also protected by the instructions given to the translator.

Step two: translate in batches

The collected text is de-duplicated first. A phrase that appears in a navigation menu and again in a footer is only sent once and then applied everywhere it appears. What remains is grouped into batches of fifty lines, and the batches are sent off at the same time rather than one after another, which is why a full page turns over in seconds rather than minutes.

The translation itself runs on our server, never in the browser, so no keys or credentials are ever exposed to the visitor. Each batch goes out as a numbered list with strict instructions: keep the numbering, keep the punctuation and spacing, do not translate brands, URLs, emails or numbers, keep the tone professional, and return nothing but the translated lines. The numbering is what lets us put each translated line back on the exact word it came from.

Step three: put it back, and remember it

Each translated line replaces the original text in place. The original English is kept in memory at the same time, which is what makes switching back to English instant: nothing is re-fetched, the saved words are simply restored.

Every translated phrase is also cached in the visitor's browser, keyed by language and by the exact source phrase. Move to a second page and most of the shared furniture, the menu, the footer, the buttons, is already translated and appears immediately with no waiting and no repeat cost. If the browser's storage ever fills up, the oldest half of the cache is cleared and the save is retried, so the feature never breaks a page.

The chosen language is remembered too. Come back tomorrow and the site loads in the language you picked, without asking again.

Step four: keep up with the page

Modern sites are not static. Menus open, accordions expand, quote builders add rows, results load as you scroll. All of that new content arrives in English after the first pass.

So the page is watched for changes. Whenever new content appears, it is queued and translated a fraction of a second later, in one pass rather than one word at a time. The visitor sees a small spinning indicator on the language button while that is happening. To them, the site simply stays in their language.

What happens when something fails

If a batch of translations fails for any reason, that batch quietly returns the original English and the rest of the page carries on. A visitor never sees an error message, a broken layout, or a half-empty page. English is always a working fallback.

There is one more safeguard: if a visitor changes language again while translations are still arriving, the late results are discarded rather than pasted over the newer language. No mixed-language pages.

Why we built it this way

  • One set of pages to maintain, in one language, with no risk of translated copies going stale.
  • Adding a language is a single line of configuration, not a new site section.
  • The English page remains what search engines index, so your rankings are not split across near-duplicate pages.
  • Costs stay low, because caching means the same sentence is only ever translated once per language.
  • Any content added later, by anyone, is translated automatically. No one has to remember to do it.

Where it fits, and where it does not

Live translation is the right answer when you want a South African audience served in their own language across a large, frequently changing site, and when English is genuinely your primary market. It is the wrong answer if you need each language to rank independently in search, or if a translation must be legally exact word for word. In those cases we build proper separate language versions with human-approved copy, and we will tell you so up front.

Want this on your site?

The same language switcher can be added to any site we build or manage. Talk to us about which languages your customers actually use, and we will tell you honestly whether live translation or fully separate language pages is the better fit.