---
title: "SEO Integration for Multilingual WordPress - PerfLocale"
description: "Hreflang, sitemap alternates, JSON-LD schema enrichment, Content-Language headers, Speculation Rules prerender, and View Transitions for multilingual WordPress."
canonical: "https://perflocale.com/features/seo/"
source: "https://perflocale.com/features/seo/"
format: "markdown"
---
# SEO

Multilingual SEO handled automatically so search engines index the right language for every visitor.

```
<!-- Auto-emitted on every translated page -->
<link rel="alternate" hreflang="en-US" href="https://acme-bakery.com/"/>
<link rel="alternate" hreflang="en-GB" href="https://acme-bakery.com/en-gb/"/>
<link rel="alternate" hreflang="de" href="https://acme-bakery.com/de/"/>
<link rel="alternate" hreflang="x-default" href="https://acme-bakery.com/"/>
```

One hreflang cluster — auto-emitted in <head> on every translated page

## Automatic Hreflang Tags

PerfLocale tells search engines about every translated version of each page. Choose page source, HTTP headers, or both for maximum coverage.

## Sitemap Integration

The built-in WordPress sitemap is extended to include links to every translation. Search engines discover all your translated content automatically.

SEO tag generation per request requests over time →

**Build** & cache **Cache hit**

1.  1
    
    First request builds the cluster
    
    Hreflang tags, JSON-LD entities, Content-Language headers — computed once and stored in the WP object cache.
    
2.  2
    
    Every later request hits the cache
    
    No DB lookups, no recomputation — tags are pulled directly from Redis / Memcached / transients.
    
3.  3
    
    Translation edits auto-invalidate
    
    PerfLocale watches your translations — the next page load rebuilds fresh tags. **No stale tags ever served.**
    

## Cached for Performance

SEO tags (hreflang, sitemap alternates, Content-Language headers, schema enrichment) are built once per page context and cached for 12 hours, so subsequent requests skip the rebuild and just emit the cached HTML. Cache clears itself when translations change.

Auto-detected Yoast SEO active — its addon wires into Yoast’s sitemap and schema

-   Yoast SEO
    
    Addon matched · filtering `wpseo_schema_graph`
    
    Active
-   Rank Math
    
    Handler available
    
    Dormant
-   SEOPress
    
    Handler available
    
    Dormant
-   AIOSEO
    
    Handler available
    
    Dormant
-   Slim SEO
    
    Handler available
    
    Dormant
-   The SEO Framework
    
    Handler available
    
    Dormant

Pay only for what runs Dormant addons don’t load any code — only the matched one runs.

## Smart Plugin Detection

If you use Yoast, Rank Math, SEOPress, AIOSEO, Slim SEO, or The SEO Framework, the matching PerfLocale addon activates on its own and wires into that plugin’s sitemap and JSON-LD output — translated entries appear in its sitemap, and its schema graph gets the right `inLanguage`. Hreflang itself stays a single source: none of the six emit head or header hreflang without a multilingual integration, so PerfLocale’s tags are the only ones on the page. The other five addons stay dormant and load no code.

```
// Auto-augmented when the enrichment setting is on
{
  "@type": "WebPage",
  "@id": "https://acme-bakery.com/about/#webpage",
  "inLanguage": "en-US",
  "workTranslation": [
    {
      "@type": "WebPage",
      "@id": "https://acme-bakery.com/de/ueber-uns/#webpage",
      "inLanguage": "de"
    },
    {
      "@type": "WebPage",
      "@id": "https://acme-bakery.com/en-gb/about/#webpage",
      "inLanguage": "en-GB"
    }
  ]
}
```

inLanguage per entity · workTranslation siblings cross-linked

## JSON-LD Schema Enrichment

PerfLocale augments the structured-data output of Yoast, AIOSEO, Rank Math, SEOPress, Slim SEO, and The SEO Framework. Every `WebPage`/`Article`/`Product` entity in the schema graph gets the correct `inLanguage` value, and translated siblings are cross-linked via `workTranslation`. On by default; zero runtime cost. [Read the JSON-LD schema enrichment docs](https://perflocale.com/docs/seo-schema/).

## Modern SEO & UX

Four features that address gaps specifically affecting multilingual sites - each solves a problem that a generic SEO plugin can't, because only a translation-aware plugin knows the sibling graph and the fallback state.

```
HTTP/1.1 200 OK
Date: Tue, 30 Apr 2026 09:00:00 GMT
Server: nginx
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=3600
Vary: Accept-Encoding, Accept-Language
Content-Language: de-DE+ PerfLocale
```

W3C-standard signal on top of `<html lang>` · Google, Yandex, and most CDN/proxy layers use it as a ranking hint

## Content-Language HTTP Header

The W3C-standard `Content-Language` response header tells search engines and proxies the page's language in BCP-47 format (`de-DE`, `fr-CA`, etc.) on top of `<html lang>`. Google, Yandex, and most CDN/proxy layers use it as a ranking signal. No downside - on by default.

Fallback wrapper PerfLocale emits

```
<article data-nosnippet>
  <!-- DE missing — English shown as fallback -->
  <p>Welcome to our bakery — we bake…</p>
</article>
```

Without the guard

acme-bakery.com › de › about

Über uns — Acme Bakery

Welcome to our bakery — we bake artisan sourdough every morning, source flour from a Devon mill…

English snippet under a German URL — visitor confused, bounces.

With PerfLocale guard

acme-bakery.com › de › about

Über uns — Acme Bakery

— snippet omitted (`data-nosnippet`) —

Page still indexed · no language mismatch in the SERP.

## Fallback-Content Snippet Guard

When a translation is missing and you show the default language as fallback, Google indexes the English text under the `/de/` URL - and happily serves English snippets in German SERPs, confusing visitors. PerfLocale wraps the fallback block with `data-nosnippet` so Google still indexes the page but omits the mismatched text from snippets. On by default; only triggers when fallback is actually active. **We’re not aware of another multilingual plugin that does this.**

Click → page visible

Without prerender

TLS server DOM paint

Full navigation

With PerfLocale

already prerendered

Already loaded

1.  1
    
    Hover or focus
    
    Visitor lands on the 🇩🇪`Deutsch` link in the switcher.
    
2.  2
    
    Background prerender
    
    Chromium fetches and renders `/de/uber-uns/` off-screen via Speculation Rules.
    
3.  3
    
    Click → instant swap
    
    Page is already there — visible the moment they click.
    

Moderate eagerness triggers on hover / focus only — **no bandwidth cost** for visitors who never switch.

## Instant Language Switching

Off by default and marked experimental in the settings. When a visitor hovers or focuses a language-switcher link, Chromium prerenders the target translation in the background. Language switch becomes effectively instant - the page is already loaded by the time they click. On WordPress 6.8+, PerfLocale integrates with Core's native [Speculation Rules API](https://make.wordpress.org/core/2025/03/06/speculative-loading-in-6-8/) via the `wp_load_speculation_rules` action - our rule lands inside Core's single speculation-rules script, automatically inherits any `/cart/*`/`/checkout/*` exclusions other plugins register, and respects the global opt-out filter. On older WP it falls back to emitting a standalone script with the same behavior. Moderate eagerness triggers only on hover/focus, so there's no bandwidth cost for visitors who never switch.

 

EN DE

240 ms crossfade View Transitions API

Standard navigation — **white flash**, jarring

View Transitions — **smooth crossfade**, no flash

Accessibility Respects `prefers-reduced-motion` — users who opt out get instant navigation. WCAG 2.1 SC 2.3.3 compliant.

## Smooth Switch Animation

Using the [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) (Chrome 126+, Safari 18.2+), switching between languages crossfades smoothly between the old and new page - no white flash. Off by default and marked experimental in the settings: the opt-in is page-wide, so once enabled every same-site navigation crossfades, and a theme that runs its own on-navigation animations can clash with it - test before turning it on. Browsers without support just navigate normally; zero breakage. Progressive enhancement you can turn on in seconds.

**Accessibility:** the default CSS respects `prefers-reduced-motion` - users with the OS-level reduced-motion preference see instant navigation without the 240ms crossfade. WCAG 2.1 SC 2.3.3 compliant out of the box. See the [Accessibility page](https://perflocale.com/features/accessibility/#reduced-motion) for details.

[← Back to Features](https://perflocale.com/features/)
