Viewing 1 replies (of 1 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    There is no API function. Here is how you can do:

    $options = get_option('polylang');
    $model = new PLL_Admin_Model($options);
    $args = array(
    	'name' => 'English',
    	'slug' => 'en'
    	'locale' => 'en_US',
    	'rtl' => 0,
    	'term_group' => 0 // strange name, but this is the order
    );
    $model->add_language($args);

Viewing 1 replies (of 1 total)
  • The topic ‘add language’ is closed to new replies.