If you’re using a translation proxy like Clonable or Weglot, you’ve probably encountered the search problem. This technical guide explains how pre-translated search indexes solve it.

The Problem Explained

Translation proxies work by intercepting HTTP responses and translating content on-the-fly. This means:

  • Your WordPress database: English only
  • What visitors see: Translated content
  • What WordPress searches: English database

When a German visitor searches for “granit”, WordPress looks for “granit” in an English database. No match.

Solution: Pre-translated Index

A pre-translated search index contains your content already translated into each target language. Instead of translating queries in real-time, we translate content in advance.

How It Works

  1. Generate XML Index – Extract titles, excerpts, and content from WordPress
  2. Translate Index – Use translation API (DeepL, Google, etc.) to translate
  3. Store Translations – Save translated indexes as XML files
  4. Search Translated Index – When visitor searches, query the appropriate language file

Technical Implementation

XML Index Structure

<search-index lang="de">
  <item id="123">
    <title>Marmorfliesen für Ihr Zuhause</title>
    <excerpt>Entdecken Sie unsere Kollektion...</excerpt>
    <url>/de/marble-tiles-for-home/</url>
  </item>
</search-index>

Search Flow

  1. Detect visitor’s language from URL (/de/, /fr/, etc.)
  2. Load corresponding XML index
  3. Perform text search in native language
  4. Return matching results with correct URLs

Advantages Over Translate-Back

  • Speed – No real-time API calls needed
  • Accuracy – Translations reviewed and cached
  • Glossary support – Custom terminology preserved
  • AJAX compatible – Works with live search
  • Autocomplete – Instant suggestions as you type

Jokerist Search Implementation

Jokerist Search implements this exact approach:

  • One-click XML generation from WordPress content
  • Multiple translation providers – DeepL, Google, Microsoft, LibreTranslate
  • Glossary system – Define industry-specific translations
  • Auto-sync – New posts automatically indexed
  • AJAX live search – Instant results

Download free from WordPress.org

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Search Window