Support » Plugin: Polylang » Function/Filter for changing current language

  • Ninos

    (@ninos-ego)


    Hey there,

    I want to combine my wp-blog with symfony. Symfony is safing the language in the session. So I need a function or filter to change the current language. In the files, e.g. choose-lang.php there are not much filters. It would be awesome to have:

    • a function pll_set_current_language()
    • a filter for changing current language
    • a action hook after language was changed

    Best regards

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

    (@chouby)

    Hi,

    You can directly set the public curlang object. For example:
    PLL()->curlang = PLL()->model->get_language( 'en' );

Viewing 1 replies (of 1 total)
  • The topic ‘Function/Filter for changing current language’ is closed to new replies.