Check 25.17 · Translating SEO elements

Detect untranslated strings

Find text left in the source language: translation files, pseudo-localization, page comparison, crawling and language detection, with no paid tools.

Priority
Important
Difficulty
Intermediate
Estimated time
2 h to 1 day
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

An untranslated string is text left in the source language on a translated version: a button, a message, an alt attribute, a meta description, a filter label. Such strings come from keys missing in language files, text hard-coded in the code, silent fallbacks to the default language, or content added after translation. This check consists of finding them methodically, at the source and on published pages, then fixing them. Once it is done, you have a complete list of strings to translate and reusable checks to run before every release.

Why it matters

Untranslated strings go unnoticed when you proofread your own language, and the team rarely reads the German or Japanese version in full. Yet the visitor sees them immediately, often in the places that matter: buy button, form, error message, shipping terms.

Google determines the language of a page from its visible content. A few isolated words do not change the detected language, but whole blocks in the source language produce a mixed-language page, less clear for the search engine and for the reader. Untranslated metadata (title, meta description, og:title) shows up directly in results and share previews.

The trickiest case is the silent fallback. Most frameworks and plugins display the default language's string when the translation is missing, with no error or warning. The site works, the tests pass, and the German version displays French. See plan for missing translations (opens in a new tab).

Generative engines citing a page in a given language reuse what they read: practical information left in the source language is less likely to be understood and reused correctly. An indirect effect, not measured.

What it improves

  • Perceived quality and conversion of translated versions.
  • Language consistency of pages, and therefore a clearer language signal for search engines.
  • Click-through rate Titles and descriptions in the language of the query.
  • Accessibility aria-label, alt and messages read out in the language of the page.
  • Maintenance cost Checks at the source avoid discovering omissions in production.

How to check

A quick ten-minute check, on three typical pages of a translated version (home page, product page or article, form):

  1. Read the page and its source code: title, meta description, og:title, alt, aria-label, placeholder, buttons.
  2. Open the interactive elements: mobile menu, filters, cart, form errors, search with no results.
  3. Run the comparison script from step 3 on the pair of source and translated pages.

Compliant result: no string in the source language apart from proper names, brand names and deliberately invariable terms listed in the glossary.

How to implement

The examples follow Thé des Lisières, a fictitious French loose-leaf tea shop, translated into German.

Before you start

Prepare two documents:

  • An allowlist: texts identical in every language that are not omissions (brand name, product names, “Sencha”, “Gyokuro”, acronyms). A text file, one entry per line. It comes from the glossary (opens in a new tab).
  • A tracking table:
URL String found Location Origin Fix Status
/de/tees/gruener-tee/ “Ajouter au panier” Button cart.add key missing from de.json Add the key Fixed
/de/ “Livraison offerte dès 49 €” Banner Untranslated plugin option Translate in the admin strings To do
/de/kontakt/ “Ce champ est obligatoire” Form error Text hard-coded in the JavaScript Go through the translation function To do

The “Origin” column matters more than the others: fixing the cause removes the string from every page at once.

Step 1 — Check the translation files

This is the cheapest check: it finds missing keys before they reach a page.

JSON files (next-intl, i18next, vue-i18n, Laravel), with jq:

jq -r 'paths(scalars) | map(tostring) | join(".")' messages/fr.json | sort > fr.keys
jq -r 'paths(scalars) | map(tostring) | join(".")' messages/de.json | sort > de.keys
comm -23 fr.keys de.keys

The last command lists keys present in French and missing in German. To find values copied over without translation:

jq -r --slurpfile de messages/de.json 'paths(scalars) as $p | select(getpath($p) == ($de[0] | getpath($p))) | ($p | map(tostring) | join("."))' messages/fr.json

Compare the result with the allowlist.

gettext files (.po, WordPress, Symfony, Django):

msgfmt --statistics -o /dev/null languages/the-lisieres-de_DE.po
msgattrib --untranslated languages/the-lisieres-de_DE.po
msgattrib --only-fuzzy languages/the-lisieres-de_DE.po

The first shows the number of translated, fuzzy and untranslated messages; the next two list them. A translation marked fuzzy is not used for display.

WordPress

Versions WordPress 6.8 to 7.1; Loco Translate 2.8, WPML 4.x with String Translation, Polylang 3.x.

  • Loco Translate shows the translation progress of each theme and plugin per language (Loco Translate > Themes or Plugins); open the German file to see the empty strings.
  • WPML: in WPML > String Translation, filter by domain and translation status to list the strings to translate.
  • Polylang: Languages > Translations lists the registered strings; an empty cell in the German column is an untranslated string.

These tools only see registered strings. Text hard-coded in a theme template appears nowhere: steps 2 and 3 find it.

Shopify

Versions Shopify admin and Translate & Adapt app, all plans, November 2026.

Export the translations (Settings > Languages, export) and open the CSV in a spreadsheet: rows where the translated content column is empty and the default content is filled in need translating. Also check the theme's locale file (locales/de.json) with the jq command above, comparing it with locales/fr.default.json.

Drupal

Versions Drupal 10 and 11.

Configuration > Regional and language > User interface translation offers a filter on untranslated strings for a language. Check the result on your version: older versions had bugs in this filter.

Laravel

Versions Laravel 11 to 13.

Laravel displays the key, or the fallback language's string, when a translation is missing. A test compares each language's keys with those of the source language:

// tests/Feature/TranslationKeysTest.php
namespace Tests\Feature;

use Illuminate\Support\Arr;
use Illuminate\Support\Facades\File;
use PHPUnit\Framework\Attributes\DataProvider;
use Tests\TestCase;

class TranslationKeysTest extends TestCase
{
    /** @return array<int, array<int, string>> */
    public static function locales(): array
    {
        return [['de'], ['en']];
    }

    #[DataProvider('locales')]
    public function test_every_source_key_exists_in_locale(string $locale): void
    {
        $missing = array_values(array_diff($this->keys('fr'), $this->keys($locale)));
        $list = implode(', ', $missing);

        $this->assertSame([], $missing, "Missing keys in {$locale}: {$list}");
    }

    /** @return array<int, string> */
    private function keys(string $locale): array
    {
        $keys = [];

        if (File::exists(lang_path("{$locale}.json"))) {
            $keys = array_keys(json_decode(File::get(lang_path("{$locale}.json")), true) ?? []);
        }

        if (! File::isDirectory(lang_path($locale))) {
            return $keys;
        }

        foreach (File::files(lang_path($locale)) as $file) {
            $group = $file->getFilenameWithoutExtension();

            foreach (array_keys(Arr::dot(require $file->getPathname())) as $key) {
                $keys[] = "{$group}.{$key}";
            }
        }

        return $keys;
    }
}

In addition, log missing keys at runtime, in AppServiceProvider::boot():

use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Facades\Log;

Lang::handleMissingKeysUsing(function (string $key, array $replacements, string $locale): string {
    Log::warning("Missing translation `{$key}` for locale `{$locale}`.");

    return $key;
});

This callback fires when a string from the JSON files is missing in the requested language; for the PHP files in lang/, only if the key is also missing in the fallback language. The test above covers that second case.

Next.js

Versions Next.js 15 and 16 (App Router), next-intl 4.

next-intl reports missing messages with a MISSING_MESSAGE error. Make them visible in development and log them in production, in i18n/request.ts:

// i18n/request.ts
import { hasLocale, IntlErrorCode } from 'next-intl';
import { getRequestConfig } from 'next-intl/server';
import { routing } from './routing';

export default getRequestConfig(async ({ requestLocale }) => {
  const requested = await requestLocale;
  const locale = hasLocale(routing.locales, requested) ? requested : routing.defaultLocale;

  return {
    locale,
    messages: (await import(`../messages/${locale}.json`)).default,
    onError(error) {
      if (error.code === IntlErrorCode.MISSING_MESSAGE) {
        console.warn(`[i18n] ${error.message}`);

        return;
      }

      console.error(error);
    },
    getMessageFallback({ namespace, key }) {
      return `[${[namespace, key].filter(Boolean).join('.')}]`;
    },
  };
});

These two options are not passed on to client components: a NextIntlClientProvider rendered in a server component inherits the messages and the locale, but not functions. Define onError and getMessageFallback in a small client component that wraps NextIntlClientProvider. If your project merges the default language's messages as a fallback, gaps become invisible: keep the jq check in CI.

Step 2 — Pseudo-localize to find hard-coded text

Pseudo-localization creates a fake test language in which every string is wrapped in markers. Any text displayed without markers does not go through the translation system: it is hard-coded.

jq 'walk(if type == "string" then "[!! " + . + " !!]" else . end)' messages/fr.json > messages/xx.json

Declare xx as an available language in the development environment only, browse the site in that language and note every text without [!! … !!]. The markers also lengthen the strings, which reveals layouts too tight for longer languages. For a .po file, translation editors and community scripts produce the same effect; adapt the method to your format.

Step 3 — Compare a source page and its translation

This Python script, with no dependencies, lists the texts that are identical between two pages: visible text, alt, title, placeholder, aria-label, button values and meta description.

#!/usr/bin/env python3
"""List the texts that are identical between a source page and its translation."""
import sys
import urllib.request
from html.parser import HTMLParser

MIN_WORDS = 2
IGNORED_TAGS = {"script", "style", "noscript", "template", "code", "pre"}
TEXT_ATTRIBUTES = {"alt", "title", "placeholder", "aria-label"}
META_NAMES = {"description", "og:title", "og:description", "twitter:title", "twitter:description"}


class TextCollector(HTMLParser):
    def __init__(self):
        super().__init__()
        self.ignored_depth = 0
        self.texts = set()

    def handle_starttag(self, tag, attrs):
        attributes = dict(attrs)

        if tag in IGNORED_TAGS:
            self.ignored_depth += 1

        if tag == "meta" and (attributes.get("name") or attributes.get("property")) in META_NAMES:
            self.add(attributes.get("content") or "")

        for name in TEXT_ATTRIBUTES:
            self.add(attributes.get(name) or "")

        if tag == "input" and attributes.get("type") in ("submit", "button"):
            self.add(attributes.get("value") or "")

    def handle_endtag(self, tag):
        if tag in IGNORED_TAGS and self.ignored_depth:
            self.ignored_depth -= 1

    def handle_data(self, data):
        if not self.ignored_depth:
            self.add(data)

    def add(self, text):
        text = " ".join(text.split())

        if len(text.split()) >= MIN_WORDS and any(character.isalpha() for character in text):
            self.texts.add(text)


def collect(url):
    request = urllib.request.Request(url, headers={"User-Agent": "comparer-chaines/1.0"})

    with urllib.request.urlopen(request, timeout=30) as response:
        charset = response.headers.get_content_charset() or "utf-8"
        html = response.read().decode(charset, errors="replace")

    collector = TextCollector()
    collector.feed(html)

    return collector.texts


source_url, translated_url = sys.argv[1], sys.argv[2]
ignored = set()

if len(sys.argv) > 3:
    with open(sys.argv[3], encoding="utf-8") as file:
        ignored = {line.strip() for line in file if line.strip()}

identical = sorted(text for text in collect(source_url) & collect(translated_url) if text not in ignored)

for text in identical:
    print(text)

print(f"{len(identical)} identical text(s) between the two pages", file=sys.stderr)
python3 comparer_chaines.py https://example.com/fr/thes/the-vert/ https://example.com/de/tees/gruener-tee/ liste-blanche.txt

The script reads the initial HTML, not the rendered DOM: text injected by JavaScript escapes it, as do single-word strings (“Panier”) as long as MIN_WORDS is 2. Run it on one pair of pages per template (home, category, product page, article, contact): a template string found on one product page is found for all of them.

To cover a whole language directory, Screaming Frog allows up to 100 search filters (Configuration > Custom > Custom Search), as text or regular expressions, with “Contains” or “Does Not Contain”. Crawl https://example.com/de/ with a “Contains” filter on phrases typical of the source language:

(?i)ajouter au panier|lire la suite|en savoir plus|livraison offerte|champ obligatoire|aucun résultat

Limit the search to the page text rather than the full HTML, and turn on JavaScript rendering to include injected text. The Custom Search tab lists the pages concerned. Custom search and JavaScript rendering are part of the paid version; without a licence, the following loop runs an equivalent search on the initial HTML of a list of URLs (urls-de.txt, taken from the German sitemap):

while read -r url; do
  count=$(curl -s "$url" | grep -o -i -E "ajouter au panier|lire la suite|en savoir plus|livraison offerte|champ obligatoire|aucun résultat" | wc -l)
  [ "$count" -gt 0 ] && echo "$count $url"
done < urls-de.txt | sort -rn

Step 5 — Detect the language of texts in Google Sheets

Export the titles, meta descriptions, H1s and alternative texts of the translated version (Screaming Frog exports), paste them into Google Sheets and add a column:

=IFERROR(DETECTLANGUAGE(B2);"?")

Filter the rows whose result is not de. Detection is unreliable on very short texts and proper names: treat the result as a list of suspects to review.

Step 6 — Fix at the source and prevent

  1. Fix the cause noted in the “Origin” column: key added, hard-coded text replaced by the translation function, plugin option translated, content retranslated. See translate dynamic content and CMS plugins (opens in a new tab).
  2. Rerun the check that found the string.
  3. Automate: the jq commands, the Laravel test or the step 3 script belong in CI. See integrate multilingual tests into CI/CD (opens in a new tab).
  4. Monitor over time: continuous detection on the live site is covered in detect the actual language and untranslated strings (opens in a new tab).

Common mistakes

  • Looking only at visible text: title, meta description, alt, aria-label, placeholder and structured data stay in the source language.
  • Relying on the fallback to the default language: the site does not break, it simply displays the wrong language.
  • Forgetting hidden states: mobile menu, modals, form errors, empty cart, search with no results, transactional emails.
  • No allowlist: brand names drown the real omissions in noise.
  • Fixing page by page a string that comes from the template or a language file.
  • Checking only once before launch, then never again: every new feature adds strings.

Frequently asked questions

How do you quickly find untranslated text on a multilingual site?

Compare a source page with its translation: any text identical in both versions, apart from brand names and invariable terms, is suspect. A script that extracts the visible text, alt attributes and meta description of both pages does this in a few seconds. Add a custom search in a crawler, on phrases typical of the source language, to cover the whole language directory.

Why does my site show French text on the German version without any error?

Most frameworks and multilingual plugins display the default language's string when a translation is missing, without any visible error. It is a silent fallback: the site works, but the key was never translated. Compare the language files with each other, log missing keys at runtime and test the site with a pseudo-localization language to also catch hard-coded text.

What is pseudo-localization?

Pseudo-localization is a fake test language in which every translatable string is wrapped in markers, for example [!! Ajouter au panier !!]. When you browse the site in that language, any text displayed without markers reveals a hard-coded string that escapes the translation system. The markers also lengthen the text, which highlights layouts that are too narrow.

Is the Google Sheets DETECTLANGUAGE function reliable?

DETECTLANGUAGE returns the language code of a text and works well on full sentences, such as titles, meta descriptions or paragraphs. It is unreliable on very short texts, proper names and closely related languages. Use it to produce a list of suspects to review, not as an automatic verdict, and combine it with a direct comparison between the source page and its translation.

Updated on

Topic checklist (PDF)

And now?

In the “Translating SEO elements” topic

  1. Translate titles and meta descriptions
  2. Translate H1/H2/H3 headings
  3. Translate the main content
  4. Translate slugs
  5. Translate ALT text and captions
  6. Translate anchors, menus and footer
  7. Translate breadcrumbs and FAQs
  8. Translate text properties in structured data
  9. Translate Open Graph and set og:locale
  10. Translate CTAs and forms
  11. Translate error messages and 404 pages
  12. Translate cookie banners
  13. Translate downloadable documents
  14. Translate subtitles and transcripts
  15. Translate dynamic content and CMS plugins
  16. Check text embedded in images
  17. Detect untranslated strings