Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    There is currently no documented API function to do this. However, you can look at the code in include/base.php and look for the functions save_translations, set_post_language, set_term_language. you can access them with $polylang->save_translations (for example), $polylang beeing a global variable. I hope the comments are sufficient to know how to use the functions. NB: $type is ‘post’ for all post types and ‘term’ for all taxonomies.

    Thread Starter Mitsugari Yamamoto

    (@mityama)

    Thans, Chouby, that should be sufficient. 🙂

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

The topic ‘Polylang API function to add translation?’ is closed to new replies.