Title: polylang and wp_insert_post
Last modified: August 22, 2016

---

# polylang and wp_insert_post

 *  Resolved [Fulgence Ridal](https://wordpress.org/support/users/theeponymus/)
 * (@theeponymus)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/polylang-and-wp_insert_post/)
 * Hi,
 * Is there something like documentation to use polylang with the function wp_insert_post()?
 * thank you
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Fulgence Ridal](https://wordpress.org/support/users/theeponymus/)
 * (@theeponymus)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/polylang-and-wp_insert_post/#post-5221814)
 * ok solved … sorry
 * global $polylang;
    $polylang->model->set_post_language($post_id, $lang);
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/polylang-and-wp_insert_post/#post-5221960)
 * Hi!
 * Yes. Or directly the API function pll_set_post_language

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘polylang and wp_insert_post’ 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/)

## Tags

 * [wp_insert_post](https://wordpress.org/support/topic-tag/wp_insert_post/)

 * 2 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/polylang-and-wp_insert_post/#post-5221960)
 * Status: resolved