Write to me

Work / Custom build

Multisite Multilingual: translations across a WordPress network

A network plugin that links translations across a WordPress multisite: its own relationship tables, strict hreflang, and a language switcher that finds the nearest translated page.

What they needed

Burotijs builds multilingual sites as a WordPress multisite, one site per language. What was missing was a dependable way to say “this page is the translation of that one” across the network, and to turn that into correct hreflang tags and a language switcher that never leads to a dead end. It had to work for new projects of any shape, not just one client.

What I built

A network-activated plugin:

  • Translation links per post, set in a metabox with search and drag-to-order.
  • Its own network tables for groups of translations and the items in them, so links don’t depend on post meta in each site.
  • Route mappings for front pages, archives, search and taxonomy terms, not only posts.
  • Strict hreflang with x-default.
  • A language switcher as a list, a dropdown or a theme template. When a page has no translation, it falls back to the nearest one that exists: a translated parent, the archive, the term, and finally the home page of that language.
  • Network admin screens with built-in help.

It is written for PHP 8.1 with typed repositories and a small container, checked against the WordPress Coding Standards and PHP compatibility rules, and covered by about 43 integration tests that run in CI on every change. Eleven documentation files describe how it works.

Why it matters

Every new multilingual project starts from a tested base instead of a fresh workaround, and visitors switching language always land somewhere real.