Title: Language Assignment in WordPress REST API
Last modified: December 5, 2023

---

# Language Assignment in WordPress REST API

 *  [flaskdev](https://wordpress.org/support/users/flaskdev/)
 * (@flaskdev)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/language-assignment-in-wordpress-rest-api/)
 * I’m attempting to follow the instructions outlined in this guide [https://polylang.pro/doc/rest-api/](https://polylang.pro/doc/rest-api/),
   but I’m encountering difficulties when it comes to assigning languages and translations.
   As my target platform is WordPress, I’m required to use ‘/?rest_route=’ before
   the path. How should I structure the request considering this alteration?
 * I’ve tried using ‘example.com/?rest_route=/wp/v2/posts/XX&lang=es’ but haven’t
   achieved success. Additionally, for translations, I attempted ‘example.com/?rest_route
   =/wp/v2/posts/YY&lang=en&translations[es]=XX’ without desired results. Could 
   anyone provide guidance on the correct way to format these requests within the
   WordPress REST API?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/language-assignment-in-wordpress-rest-api/#post-17254435)
 * Hello,
 * As mentioned in the doc, this feature is available in Polylang Pro. If you are
   using this plugin, then please ask your questions to [https://polylang.pro/support/](https://polylang.pro/support/)
   as the support of Premium plugins is not allowed in this forum.

Viewing 1 replies (of 1 total)

The topic ‘Language Assignment in WordPress REST API’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/language-assignment-in-wordpress-rest-api/#post-17254435)
 * Status: not resolved