polylang-rest-headless
Installation
SKILL.md
Polylang REST and Headless
Use this skill when a client, plugin, or importer talks to WordPress REST and expects language-aware content.
Core Polylang and Polylang Pro behave differently:
| Stack | REST behavior |
|---|---|
| Polylang core | Defines current language from lang; exposes pll/v1/languages and settings controllers. |
| Polylang Pro | Adds lang and translations REST fields to translated posts/terms; filters collections by lang; adds translation endpoints. |
| Polylang for WooCommerce | Replaces generic Pro handling for products/orders/product taxonomies with Woo-aware handlers. |
Current language in REST
Polylang core reads a lang request parameter during REST dispatch:
GET /wp-json/wp/v2/posts?lang=fr