DELTAWEB
All posts
Technical SEO

Multilingual Site Speed: Translation Scripts and Overhead

Translation scripts add extra requests, layout shift from text swaps and INP load to a multilingual site. We compare them with server-rendered pages.

Multilingual Site Speed: Translation Scripts and Overhead
12 minReading time
Arif KuruAuthor

When an international buyer opens a page on a multilingual export website, is the first text they see actually in their language, or is it a translation written over the original a few hundred milliseconds later in the browser? The answer decides more than which content a search engine sees. It also decides how fast and how calmly the page loads. A script that translates on the client side brings its own files, its own network requests and its own processing work into the page. This article covers the speed side of our international technical SEO guide to crawling, indexing and rendering on multilingual sites.

We looked at the indexing side in an earlier piece that asked whether JavaScript-translated content gets indexed. The focus here is different: the extra requests of a translation layer, the layout shift caused by swapping text, interaction delay, and caching per language. Each heading answers one question, so you can pick the question that matters first for your own site.

Where does the translation layer enter the page?

On a multilingual site, where the translation is produced determines almost all of its speed behavior. Broadly there are two routes: the text is written in the target language on the server while the HTML is generated, or it is replaced in the browser by a script after the page opens. Both can end up showing the visitor the same language, but the path to get there is very different.

How does a client-side translation widget work?

A typical translation widget works in this order. The browser first downloads and displays the HTML in the source language, then loads the widget script. The script walks the text nodes on the page, detects which language is wanted (from a cookie, a URL parameter, the browser language or a user choice), fetches a translation dictionary or a response from a translation service, and replaces the text in place. Some solutions read translations from a prepared file; others call a service each time the page opens.

The appeal is obvious: you can offer many languages by adding one script, without rebuilding the site. The price is that the page appears twice: first in the source language, then in its translated form. The gap between the two depends on network conditions, device power and how much text the page holds.

What changes with a server-rendered language version?

With a language version produced on the server or at build time, each language has its own URL, and the HTML at that URL carries the target-language text directly. The browser receives the right language with the first bytes; there is nothing left to replace. Static generation, server-side rendering and incremental regeneration all belong to this group. Translation here is a publishing step, not a loading step.

TopicClient-side translation widgetServer-rendered language version
First visible textOften the source language, then swappedTarget language from the start
Extra network requestsScript, dictionary or service responseNo extra request for translation
Layout shift riskPresent, because text length changesNo translation-driven shift
Main thread workScanning text and rewriting the DOMNo extra work for translation
Cache keySame URL, language held in another signalEach language on its own URL
Setup speedQuick to startNeeds content and structure planning

The table is not a quality ranking. Being able to switch a widget on quickly is a real advantage, and in some situations it is the right call. If speed and search visibility are the goals, though, you need to know where the difference comes from.

How much weight do the extra requests add?

There is no single numeric answer. The weight depends on the solution you use, the amount of text on the page and the network the visitor is on. What makes up that weight, however, is usually the same, and you can see each part on your own site.

Which requests join the chain?

  • The widget script itself: It often comes from another domain, which means a separate DNS lookup, connection and TLS handshake.
  • A configuration file: A settings request that says which languages are enabled and which elements should stay untranslated.
  • The translation dictionary or service response: The translations matching the page text. The longer the page, the larger this response can become.
  • The language switcher interface: Flag icons, extra stylesheets and sometimes a separate font.
  • Measurement and logging requests: Some services send additional requests to track usage.

Some of these requests depend on each other: the configuration cannot be requested before the script loads, and the dictionary cannot be requested before the configuration arrives. Dependent requests form a chain, and every link adds latency, especially in countries far from the server. For a buyer in North America or East Asia visiting a site hosted in Türkiye, this chain can take longer than it does for a local visitor to the same page.

Close-up of an open dictionary page with words and definitions in Esperanto
Photo: Stefan G / Pexels

How do you measure the overhead?

The most reliable method is a comparison. Measure the same page once with the widget enabled and once with it disabled, then put the two results side by side. In the network tab of the browser developer tools you can filter the widget's requests by domain and see the total data transferred and the order in which requests start. In the performance tab you can watch how long the script keeps the main thread busy.

Measuring only on a fast desktop connection is misleading. Repeat the test with network and CPU throttling and, where possible, from a test location close to the target market. Lab measurements help you find the problem; field data shows what real users experience. Check the official source for the current state of which tools report field data and under what conditions.

Does swapping text cause layout shift?

Yes, it can. Cumulative Layout Shift (CLS) measures elements moving when the user does not expect it. With client-side translation, the text changes after the page is already on screen, and that change can alter the size and position of elements.

Why does the shift happen?

Languages express the same meaning at different lengths. The German version of a Turkish heading may be longer and the English version shorter, and compound words change where lines break. When a heading grows from two lines to three, the paragraph, image and button below it move down. When navigation items widen, one item may drop to a second row. When product names change length, product cards can fall out of alignment.

Fonts are another source. If the target language uses characters the source language does not, the browser may download an extra font file or fall back to a different font. When that font arrives, the text metrics change again and a second shift can follow.

Can the shift be reduced?

If you keep using a widget, a few measures limit the effect. Reserve enough room in headings and buttons for the longest language, fix card heights, give images width and height attributes, and design navigation so it tolerates overflow. Some solutions hide the page text until translation is finished. That can reduce shifting, but the user then sees the text later, and the time until the largest content element appears can grow.

The root fix is for the text to arrive in the right language in the first HTML. If there is no text to replace, there is no translation-driven shift. The remaining sources of shift, such as images, ad slots or late-loading components, are handled separately and have nothing to do with language.

How does a translation script affect INP?

Interaction to Next Paint (INP) measures how long it takes for the page to respond visually after a click, tap or key press. A translation script can affect this metric in two ways: by keeping the main thread busy while the page loads, and by making interactions such as switching language heavier in themselves.

Why does the main thread stay busy?

The browser runs JavaScript and repaints the page largely on the same main thread. A translation script uses that thread while it walks and rewrites every text node on the page. On long product pages, technical tables and crowded category lists, this work can turn into long tasks. If the user clicks a menu or a quote form during that time, the browser can only paint the response after the task has finished.

Some widgets set up DOM observers to watch for changes, so that when new content appears, for example when a tab opens, it gets translated too. That means extra work every time a dynamic component opens, and it can slow down the interactions themselves.

How do you measure the language switcher interaction?

Clicking the language switcher is an interaction too. In a client-side setup, that click can trigger reprocessing of the whole page's text. In a server-rendered version, the switcher is an ordinary link: a new page loads, and no heavy in-page work is counted toward INP. To measure it, start a performance recording in the browser, click the language switcher and a few key components, then review the long tasks and interaction durations. Check the official source for the current state of how interaction metrics are reported in field data.

How is caching separated per language?

Caching is one of the strongest tools for global speed, but on a multilingual site the question of what the cache stores, and under which key, deserves its own attention.

What does the cache hold with client-side translation?

On a site that uses a widget, the CDN usually stores the source-language HTML, because the language is not in the URL but in a cookie or in the script's own logic. The HTML can reach every visitor quickly, yet the actual translation step is repeated in the browser on every visit. The dictionary file can be cached; how long service responses are kept depends on the provider's configuration. In the end caching recovers part of the speed, but the delay, shifting and processing load caused by translation remain.

When language selection is tied to a cookie or the Accept-Language header, another risk appears: if the same URL produces responses in different languages and the cache does not tell them apart, the wrong language can be served to other visitors. We covered this risk through the Vary header and cache key in our article on hreflang with CDNs and caching and the Vary header issues behind it.

How do per-language URLs simplify caching?

When each language has its own URL, the cache key is simply the address. The page under /de/ always returns German and the page under /en/ always returns English; there is no need for a Vary header or cookie-based separation. Each language carries its own cache entry, and an update in one language only requires purging that language's entry. We explained how to configure edge servers to deliver this structure quickly in different regions in our multi-region CDN setup guide.

Per-language URLs have a cost as well: the number of pages held in cache multiplies with the number of languages, and a template change means every language's entries need refreshing. That load becomes manageable with a publishing flow that can purge the cache by language and by page.

Close-up of a person's hands coding on a laptop with code visible on the screen
Photo: Lukas Blazek / Pexels

Remove the widget or limit it?

Removing a widget overnight is not always possible; existing languages, internal links and user habits may depend on it. The decision should follow which languages and pages carry commercial value for you.

How should the transition be planned?

  1. Choose priority languages: Identify the languages of the markets that send quote requests or that you are targeting.
  2. Choose priority pages: The homepage, product groups, the most visited product pages and the quote form come first.
  3. Render these pages on the server: Set up a separate URL per language, reviewed translations and correct hreflang annotations.
  4. Disable the widget on those pages: Two translation layers running on one page hurt both speed and consistency.
  5. Handle old language parameters: If the widget produced its own addresses, plan how they will point to the new URLs.
  6. Measure before and after: Compare network requests, layout shift and interaction durations on the same pages.

When does a widget still make sense?

For languages with no commercial goal and no expected search traffic, a widget can be a reasonable stopgap that gives visitors a rough sense of the content. Even then, the load stays limited if the script loads only when the user asks to change language, does not run while the page is opening, and critical components such as the quote form do not depend on it. Remember, too, that some visitors use their browser's built-in translation, which adds no script to your site.

We look at the wider speed impact of external code, beyond translation tools, in our article on how third-party scripts affect global site speed.

What order should measurement follow?

The sequence below is a practical starting point for seeing the speed impact of a translation layer. Repeat each step for at least one target language and one mobile profile.

  • Open the page source: does the first HTML carry the target-language text, or the source language?
  • List the translation requests in the network tab: how many domains, how many dependent requests?
  • Load the page on a slow network profile and watch the moment the text changes language.
  • In a performance recording, find the layout shifts and which elements cause them.
  • Click the language switcher and the quote form, then review long tasks and interaction durations.
  • Check the response headers for cache status and for the signal used to separate languages.
  • If field data is available, compare it by market; confirm the reports' coverage with the official source.

The picture these checks produce usually comes down to one question: does language enter the page at publishing time, or is it rebuilt in every visitor's browser? For which pages on your site is the answer still "in the browser"?

FAQ

Frequently Asked Questions

  • Does a translation widget always slow a page down?

    Not always to the same degree, but it adds a script, extra requests and extra processing to the page. How large the effect is depends on the solution, the amount of text and the visitor's network. The soundest approach is to measure the same page with the widget on and off and compare.

  • Why does a server-rendered language version load faster?

    Because the text arrives in the target language in the first HTML, leaving nothing for the browser to replace. No extra request, text scan or DOM rewrite is needed for translation. How big the difference is depends on the rest of your site's setup.

  • Why does swapping text increase CLS?

    Languages express the same meaning at different lengths, so translated headings, menus and buttons change the size of elements. Because the change happens while the page is on screen, it can push the content below it. If the target language uses different characters, a late font can cause a second shift.

  • Is hiding text until translation finishes a good fix?

    It can reduce shifting, but the user sees the text later. The time until the largest content element appears can grow, and the page may look empty or half-built. The lasting fix is for the text to arrive in the right language in the first HTML.

  • How does a translation script affect INP?

    The script uses the main thread while it walks and rewrites the text on the page, and that can create long tasks. Clicks made during that time get a delayed response. Clicking the language switcher can also trigger reprocessing of the entire page.

  • Does a CDN speed up client-side translation?

    Partly: the script, the dictionary and the source-language HTML can come quickly from cache. But because the translation step repeats in the browser on every visit, the delay, shifting and processing load remain. With a separate URL per language, each language carries its own cache entry.

  • How should a move from a widget to server-rendered languages start?

    Start by choosing the languages of markets that send quote requests and your most visited pages. Publish those pages on a separate URL per language with reviewed translations and hreflang annotations, and switch the widget off there. Compare before and after with the same measurements.

  • When is it reasonable to keep using a widget?

    It can be a reasonable stopgap for languages with no commercial goal and no expected search traffic, giving visitors a rough sense of the content. Loading the script only when the user asks to change language keeps the load limited. Critical components such as the quote form should not depend on the translation script.

Related Articles

No comments yet

Leave a Comment