Title: Addons functionality in Polylang ?
Last modified: August 30, 2016

---

# Addons functionality in Polylang ?

 *  [Sithu Thwin](https://wordpress.org/support/users/herzcthu/)
 * (@herzcthu)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/addons-functionality-in-polylang/)
 * I’m trying to write a plugin. I want to use polylang functions in my plugin. 
   I will make my plugin cannot active without polylang plugin.
    When my plugin 
   activate, I want to create 2 polylang language automatic. One is primary language
   for site and another is custom language. When user write a post in primary language,
   my plugin will translate to another custom language using some conversion process.
   Is it possible to create language sets and auto translate using 3rd party plugin
   like mine? Currently I can’t show my code, because it is just an idea.
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/addons-functionality-in-polylang/#post-6303208)
 * Hi!
 * Once your languages are created, the [Polylang API](https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/)
   should help you.
 * To create the languages programmatically, you will need to deal a bit more with
   internals but that should be as easy as:
 *     ```
       /*
        * list of arguments that $args must contain:
        * name           -> language name (used only for display)
        * slug           -> language code (ideally 2-letters ISO 639-1 language code
        * locale         -> WordPress locale. If something wrong is used for the locale, the .mo files will not be loaded...
        * rtl            -> 1 if rtl language, 0 otherwise
        * term_group     -> language order when displayed
        *
        * optional arguments that $args can contain:
        * no_default_cat -> if set, no default category will be created for this language
        */
   
       $options = get_option('polylang');
       $model = new PLL_Admin_Model($options);
       $model->add_language($args);
       ```
   
 *  Thread Starter [Sithu Thwin](https://wordpress.org/support/users/herzcthu/)
 * (@herzcthu)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/addons-functionality-in-polylang/#post-6303220)
 * Hi Chouby,
    Thanks for the answer. Now I can get a good start. Will come back
   after I wrote some code and found problem 😀
 * I’m one of your plugin localization maintainer.

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

The topic ‘Addons functionality in Polylang ?’ 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

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

 * 2 replies
 * 2 participants
 * Last reply from: [Sithu Thwin](https://wordpress.org/support/users/herzcthu/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/addons-functionality-in-polylang/#post-6303220)
 * Status: not resolved