MTLanguages replaces taxonomy-heavy WordPress multilingual plugins and custom theme routers with a normalized 3-table relational engine (mt_languages, mt_lang_objects, mt_lang_strings) built for fast FSE sites and the PolyThemes ecosystem. Site-wide multilingual features activate out of the box with clean prefix routing, hreflang + x-default metadata, XML sitemap alignment, multilingual /{lang}/llms.txt feeds, and an SVG Flag Switcher block, while WooCommerce Multilingual stays strictly OFF by default until store owners explicitly opt in.

Why Relational Tables Outperform WordPress Term Taxonomy Bloat
Legacy WordPress multilingual tools often overload wp_terms, wp_term_taxonomy, and serialized option arrays to link translated posts and strings. As content libraries grow across multiple languages, every frontend query incurs extra taxonomy joins and slows down cache-miss rendering.
MTLanguages isolates multilingual data into three lean, indexed InnoDB tables:
{prefix}mt_languages: Stores active language codes, WordPress locales (en_US,da_DK,vi_VN), RTL flags,hreflangtags, and localized landing page IDs in a request-cached lookup array (under 1ms in-memory resolution, 0% option autoload bloat).{prefix}mt_lang_objects: Uses composite indexing on(object_type, object_id)and(translation_group_id, lang_code)so resolving any page translation takesO(1)time (100% taxonomy-free without touchingwp_term_relationships).{prefix}mt_lang_strings: Batch-loads registered UI strings once per request into memory (mtlang_get_string()) to eliminate repeated per-label SQL queries (1 query per language vs 20+ repeated lookups, saving 65% to 90% string overhead), keeping TTFB <= 800ms, LCP <= 2.5s, and INP <= 200ms consistent across locales.
When activated on an existing PolyThemes site, MTLanguages automatically migrates active locales (en, da, vi) alongside localized homepage IDs (#939, #9949, #9951) and cleanly disables the built-in theme fallback router via polythemes_disable_builtin_language_router.
How MTLanguages Boosts Technical SEO, Hreflang, XML Sitemaps, and GEO
Multi-region sites lose rankings and AI citations when search crawlers encounter mismatched <html lang> tags, broken canonical links, or untranslated Markdown endpoints. MTLanguages coordinates four clean discovery signals automatically:
- Deterministic Locale & HTML Attributes: Resolves URL prefixes (
/,/vi/,/da/), switches WordPress translation locales viaswitch_to_locale(), and keeps HTMLlangand RTL attributes accurate for screen readers and search bots. - Complete Alternate
hreflang&x-defaultTags: Emits non-duplicated<link rel="alternate" hreflang="..." />annotations across public pages while skipping private/cart,/checkout, and/my-accountflows. - Core XML Sitemap Synchronization: Hooks
wp_sitemaps_posts_entrycleanly so translated landing pages resolve to canonical regional URLs inwp-sitemap.xml. - Multilingual
/{lang}/llms.txtBridge: Generates localized Markdown knowledge summaries per language and pairs with MTCache GeoCacheBridge forETagcached AI crawler responses.
Learn how structured graphs and machine-readable files lift AI citations in Schema JSON-LD @graph and /llms.txt for AI Search.
Why WooCommerce Multilingual Defaults to OFF (wc_multilingual_enabled = false)
Not every WordPress store with localized corporate pages or multilingual blogs wants translated product URLs, duplicated SKU trees, or synchronized order metadata immediately upon plugin activation. Enabling full store translation prematurely can alter /shop/ archive filters unexpectedly.
MTLanguages enforces a clear Opt-in Safety Boundary across store workflows:
| Mode | Attached WC Hooks | Storefront Impact on /shop/ & /checkout/ |
Recommended Audience |
|---|---|---|---|
| Default Safe Mode (OFF) | 0 WooCommerce hooks loaded |
/shop/, PolyBlocks filters, /cart/, /checkout/ run completely untouched |
Multilingual content sites with single-language WooCommerce checkout |
| Opt-in Active Mode (ON) | Full W1 - W4 modules booted |
Maps WC core pages, syncs stock/prices/JSON attrs across pairs, persists cart language & stamps HPOS _mt_lang orders/emails |
Stores actively selling localized product catalogs in multiple languages |
When store owners opt in via MTLanguages -> 4. WooCommerce (Opt-in) (protected by an explicit confirmation modal), W1 - W4 modules handle localized Shop/Cart/Checkout/Account IDs, bi-directional _stock/_price sync, PolyBlocks WcProductAttrs JSON synchronization, cart session tagging, and HPOS + legacy _mt_lang order metadata for localized transactional emails.
Language Switcher Block, Reusable Flags & Conflict Guard
Rather than duplicating SVG assets, MTLanguages provides both a Gutenberg FSE block (mtlanguages/switcher), shortcode [mtlanguages_switcher], and Classic Widget that reuse clean inline vector flags directly from PolyThemes\Theme\Flags (0 external flag requests, zero decorative link underlines).
If another multilingual plugin (Polylang, Polylang Pro, Polylang for WooCommerce, WPML, TranslatePress, Weglot, or GTranslate) is active simultaneously, ConflictDetector automatically moves rewrite rules into Standby mode so permalinks never break. Check how WordPress SEO, GEO, and CWV architecture ties these layers together.
Frequently Asked Questions
Will activating MTLanguages modify my existing WooCommerce products or /shop/ filters?
No. WooCommerce Multilingual is strictly OFF by default (wc_multilingual_enabled = false), registering 0 WooCommerce hooks until you explicitly turn it on inside MTLanguages -> 4. WooCommerce (Opt-in).
Does MTLanguages integrate cleanly with MTCache full-page caching?
Yes. MTLanguages injects the active request language token into mtcache_vary_key so English, Danish, and Vietnamese visitors receive language-accurate cached HTML pages without cross-locale leaks.
What happens if I uninstall MTLanguages later?
All WordPress posts, pages, and products stay safe as standard WordPress records. Custom database tables (mt_languages, mt_lang_objects, mt_lang_strings) are preserved by default and only removed if you explicitly enable uninstall cleanup.
Does MTLanguages support Child Themes and WooCommerce HPOS orders?
Yes. Child Themes can resolve current language codes via mtlang_current() and mtlang_get_post_translation(), and when WooCommerce Opt-in is enabled, customer language (_mt_lang) saves through WC_Order HPOS APIs for transactional emails.
Launch PolyCMS: The Ultimate Open Source Content Management System
Take full control of your website and digital platform. PolyCMS is a modern, developer-friendly, and open-source content management system designed to make publishing effortless. Create blogs, landing pages, custom themes, and extensions - and manage everything from one powerful, unified dashboard.
Why Choose PolyCMS?
Free and Open Source: Clean code, zero licensing costs, and complete ownership of your data and platform.
Developer First: Fully customizable, extensible with plugins, and built with modern web architectures.
Built-in Power: Ready for blogs, static pages, multilingual setup, and seamless SEO customization.
Continuous Evolution: As our community expands and we release more themes, extensions, and page builders (MTBuilder), the core system remains completely free.
Get started with PolyCMS today and build without limits. Explore the code on GitHub or read our setup guide.