DELTAWEB
All posts
Technical SEO

Is JavaScript-Translated Content Indexed? An SEO Guide

If a translation plugin swaps text in the browser, your language versions may never appear in Google. See why separate URLs matter and how to check yours.

Is JavaScript-Translated Content Indexed? An SEO Guide
12 minReading time
Arif KuruAuthor

When you install a translation plugin, do the English, German and Arabic versions of your site appear in Google as separate pages, or do those languages, visible on the visitor's screen, simply not exist for the search engine? This is the technical detail exporters most often skip when they want a multilingual site up quickly. The answer depends on where the translation is produced and at which address it lives. We cover the broader picture in our guide to crawling, indexing and rendering on multilingual sites; this post focuses only on translation done with JavaScript.

How browser-side translation works

Most JavaScript-based translation solutions follow the same logic. The server sends the page in one language, usually Turkish or English. Once the page opens in the browser, a script runs, finds the text fragments and replaces them with their equivalents in the selected language. The equivalents may come live from a translation service, be read from a prepared language file, or be fetched from a plugin vendor's own servers.

For the visitor the result can look flawless: they pick German and the headings and paragraphs switch to German almost instantly. Yet if you look at the address bar, you will usually see that nothing has changed. The address is the same; the choice is stored in a cookie, in browser storage or in a session variable. The translation lives in the current view of the page, not in the page itself.

This setup comes in three typical forms:

  • Translation widget overlay: A ready-made script added to the page sends the text to a translation engine and shows the result in place. It is usually machine translation, and the content owner has limited control over it.
  • Client-side i18n on one URL: The development team prepares the language files itself, but a front-end library such as React or Vue picks the language in the browser, and every language is served from the same address.
  • Proxy or server-side translation: Translation happens on the server or in an intermediate layer, and each language is delivered as ready HTML at its own address. This third form is, in fact, the fix for the "JavaScript translation" problem.

Does Google process JavaScript?

Yes, it does, but that answer on its own is misleading. According to Google Search Central documentation, Googlebot handles pages in three phases: crawling, rendering and indexing. During rendering, JavaScript is executed with a recent version of Chromium and the resulting HTML is evaluated. So it is technically possible for Google to see text that was added in the browser after load.

The catch is that Googlebot does not open a page the way your visitor does. It does not click the language menu, does not choose "Deutsch" from a dropdown, and does not wait for content that needs scrolling or interaction. The documentation also notes that Googlebot generally does not keep cookies across sessions and works in a stateless way. A language preference stored in a cookie therefore does not exist for Googlebot on its next crawl. The bot sees whatever that address shows by default.

The practical consequence is clear: even when Google runs your JavaScript, it does not by itself trigger a language switch that depends on user interaction. A page offering five languages on one address is, in Google's eyes, a single page in a single language. Because the details and limits of rendering can change over time, check the official source for the current state, namely the JavaScript SEO basics page on Google Search Central.

Why separate URLs are required

One of the clearest statements in Google's guidance on multilingual and multi-regional sites is the recommendation to use a separate URL for each language version. Changing content on the same address based on cookies or browser settings is not recommended. The reasoning behind it is simple: a search engine indexes addresses, not screenshots.

One URL, one version

Every record in the index corresponds to a URL. An address has one title, one description and one main body of content. The result shown to a buyer who would find you in a German search is also an address. If your German text is not tied to an address, Google has no record it could show for German queries. Even if a result appears, the person who clicks it lands on the default language, because the language choice sits in the browser, not in the link.

This is not limited to Google. Bing, Yandex and other search engines differ in how well they process JavaScript, and some crawlers do not execute it at all. Social network link previews, the crawlers used by AI assistants and many SEO tools also tend to look at raw HTML. If translation only happens in the browser, all of these systems see your site as monolingual.

What hreflang connects

hreflang is markup that connects the language and regional versions of the same content. But what it connects are addresses: it says "the German equivalent of this page is at this URL". A translation layer working on one address has no second URL to point to, so hreflang cannot be set up. A single self-referencing hreflang line does not create a language version.

Some plugins try to close this gap by adding a parameter to the same address or by using redirects that imitate subfolders. Set up correctly, these can satisfy the separate-URL requirement; however, parameter-based structures carry their own risks and not every plugin handles this the same way. We compare plugins with native multilingual architecture, including a decision table, in our post on Weglot and its alternatives.

A programmer writing code on a laptop
Photo: cottonbro studio / Pexels

Comparing the three approaches

The table below summarises what changes for search visibility depending on where you produce the translation. The assessment reflects typical setups; specific settings in the product you use may change the outcome.

ApproachIs the language version indexable?Does it have its own URL?Is hreflang possible?Main risk
Translation widget overlayNo; Google sees the default languageNo, every language sits on the same addressNo, there is no second address to pairLanguage versions never appear in search; machine translation quality cannot be controlled
Client-side i18n on one URLUsually only the default languageNo, the language is kept in a cookie or storageNo, as long as the address does not changeQuality translation work never reaches the index; title and description stay in one language
Server-rendered URL per languageYes, each version is assessed separatelyYes, for example /de/ or /en/Yes, with reciprocal linksSetup and maintenance effort; keeping language versions up to date

The second row is the case most often overlooked. The team has had the content translated by professional translators and prepared the language files carefully, but because the application chooses the language in the browser, the search engine never sees that work. Translation quality and indexability are separate questions.

In the third row, "server-rendered" covers server-side rendering, static site generation and pre-rendered pages alike. What matters is that the first HTML, before the browser runs any JavaScript, already contains the text in the right language, the correct lang attribute and the hreflang links.

How to check your site

Two simple checks help here: one shows what Google sees, the other what your server sends.

Rendered HTML in URL Inspection

The URL Inspection tool in Search Console shows an address's index status and the result of a live test. In the live test you can usually view the rendered HTML, a screenshot and any resources that failed to load. Test the page you believe is the German version and search the rendered HTML for German text. Because the Search Console interface and menu names change from time to time, check the official source, the Search Console help pages, for the current steps.

Watch three things in this test:

  • Which language does the <html lang> value in the rendered HTML state?
  • Which language are the title tag and meta description in?
  • Is the body text the same as what a visitor who has not chosen a language sees?

We explain which signals Google uses to determine a page's language, and what happens when they conflict, in our post on how Google detects a page's language.

Looking at the source

The second check is even simpler. View the page source in your browser; this is the raw HTML the server sent, not the live DOM in the developer tools. Or download the page from the command line with a request that does not run JavaScript. If the German text is not in the raw HTML, translation happens entirely on the client side. In that case only systems that execute JavaScript can see the translation, and only when no user interaction is required.

Also look at the links in the language menu. Are the menu items real <a href> links, or buttons tied only to a click event? Googlebot discovers links through the href attribute. A language menu built from buttons makes those addresses harder to discover, even when separate addresses exist.

Proxy and server-side translation

There are several ways to move to separate language URLs without rebuilding your current site from scratch. Which one fits depends on the site's platform, the volume of content and who will control translation quality.

Translation proxy: A layer placed in front of your site fetches the original page from the server when a visitor or bot requests an address under /de/, translates the text and sends it as complete HTML. Each language is then ready at its own address without waiting for JavaScript. Some commercial plugins use this method for their subfolder or subdomain option. Points to check are whether translations can be edited by hand, whether hreflang and canonical tags are generated automatically, and whether the language versions are added to the sitemap.

Server-side rendering or static generation: Frameworks such as Next.js or Nuxt can build the page on the server per language. If the language files already exist, moving a client-side i18n setup to language-prefixed routes is often the most efficient path.

Native multilingual structure in the CMS: The content management system keeps a separate record for each language, and each record has its own title, description and slug. It is the most transparent to maintain: the panel shows which page is missing in which language.

Whichever route you choose, avoid switching language versions automatically based on the visitor's location. Because Googlebot crawls largely from specific locations, location-based content can mean some versions are never seen; we look at that risk in our post on Googlebot crawling from the US and location-based content. How Google treats structures where the same address changes by language is covered under locale-adaptive pages and their limits.

A cardboard robot toy wearing glasses on an open book
Photo: Lisa Fotios / Pexels

Browser auto-translate

Another question exporters often ask is this: "Chrome already translates the page, so do we need a separate language version?" The automatic translation a browser offers is an action performed on the visitor's own device, at their own request. It is not your content, it does not sit at your address and it adds nothing to the search engine's index.

This distinction matters in several ways:

  • Search: A buyer searching in German will not find your Turkish page in German results. Browser translation only kicks in after they reach the page.
  • Terminology control: Product names, technical dimensions and industry terms can change in machine translation. You did not choose the text the visitor reads.
  • Interface: Because browser translation rewrites the page's text nodes, form, filter or cart components in some JavaScript applications may behave unexpectedly.
  • Trust: Buyers usually notice the difference between a page written in their language and one the browser has translated.

In short, browser translation gives visitors a stopgap on sites that have no language versions, but it does not replace a market strategy. If you want to be found in a market, the text in that language has to live at your address and under your control.

Migration steps in order

When moving from a JavaScript-translated site to indexable language versions, the following order reduces mistakes that are hard to undo:

  1. Take inventory: List which pages are served in which languages and where the translations come from.
  2. Choose the URL structure: Decide between subfolders, subdomains or country-code domains. For most exporters, subfolders are the easiest to manage.
  3. Move translation to the server: Make sure the first HTML contains the right-language text, the correct lang value, and a language-specific title and meta description.
  4. Turn the language menu into links: Each language option should be a real link to the same page's address in the other language.
  5. Set up hreflang and canonical tags: Each version should name itself as canonical, and all versions should point to one another reciprocally.
  6. Update the sitemap: Add the new language addresses to the sitemap and submit it in Search Console.
  7. Remove the old script: Switch off the translation widget or client-side language switching; running both systems at once can translate the text twice.
  8. Verify: Test a few sample addresses with URL Inspection and confirm the right language in the rendered HTML.

During migration the old single address usually remains the address of the default language. Adding the new language addresses without changing that address's content is the safest way to keep existing rankings. Language versions can take time to be indexed; monitoring the page indexing report in Search Console by language folder shows early which version is stuck.

One last self-check: when you send a buyer a link to the German version of your site, do they see the German page without touching the language menu?

FAQ

Frequently Asked Questions

  • Do language versions from a translation widget show up in Google?

    Usually not. Because the widget swaps text in the browser on the same address, Google sees and indexes that address's default language. No separate record is created for the other languages.

  • If Google runs JavaScript, why doesn't it see the translation?

    Google can run JavaScript, but it does not click the language menu and does not keep a cookie-stored language preference between crawls. A translation triggered by a user's choice therefore never happens for the bot. Check Google Search Central for current rendering details.

  • Is a separate URL for each language really necessary?

    Yes, Google's guidance for multilingual sites recommends a separate URL for each language version. Search engines index addresses, so a language version without its own address cannot be shown in results.

  • Can hreflang be added to a translation system that runs on one URL?

    Not in any meaningful way. hreflang connects the addresses of different language versions, and without a second address there is nothing to connect. Set up a separate URL per language first.

  • How can I tell whether my site translates with JavaScript?

    View the page source and search the raw HTML for the language version's text. If it is not there, translation happens on the client side. You can also check the rendered HTML in a live test with URL Inspection in Search Console.

  • Isn't Chrome's automatic translation enough?

    Not for search visibility. Browser translation happens on the visitor's device after they reach the page, and it adds nothing to the index. You also have no control over terminology.

  • Is a translation proxy a safe option for SEO?

    Set up correctly, it can be a suitable option. A proxy serves each language as ready HTML at its own address; still, check separately that translations can be edited, that hreflang and canonical tags are generated, and that the sitemap includes every version.

  • How do I fix a site that uses client-side i18n with React?

    Keeping the existing language files and moving to server-side rendering or static generation with language-prefixed routes is often the most efficient path. The same translations then sit in the first HTML, each language at its own address. Update hreflang and the sitemap afterwards.

Related Articles

No comments yet

Leave a Comment