• Resolved borkk85

    (@borkk85)


    Hey,

    I am new to the TranslatePress plugin and I was wondering if it is possible to use the trp_translate function to translate the content of the generated post? Example code snippet below. Any suggestion would be helpful. Thanks.

    $translated_title = trp_translate($blog_post_titles, 'en_GB', false); 
    $translated_content = trp_translate($blog_post['post_content'], 'en_GB', false); 
    wp_update_post(array( 'ID' => $newblog_post_id, 'post_title' => $translated_title, 
    'post_content' => $translated_content ));
Viewing 1 replies (of 1 total)
  • Hey there,

    Thanks for reaching out to us!

    Yes this should work as intended, you can read more about the trp_translate function here.

    Let me know if you have further questions.

Viewing 1 replies (of 1 total)
  • The topic ‘Using trp_translate to tranlate automatically generated blog posts’ is closed to new replies.