• Hi all,

    I’m currently coding a widget for my website. I would like that a string (which is given by the user) is added to the String Translation tab of polylang, exactly as polylang already do for the title of all the widget.
    So I try to call the function pll_register_string from inside the widget method update, like this:

    if( function_exists('pll_register_string'))
    {
        pll_register_string('no_event_text-sport_calendar', $instance['no_event_text']);
    }

    But no string is added in the string translation tab of polylang and I verified that the code inside the if is executed.

    I’m missing something or is it just not possible to call pll_register_string from inside a widget method???

    Thanks for your help ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • you can read this blog that help you but in arabic language
    polylang

    Thread Starter vivien streit

    (@vivien-streit)

    Thank you for you answer.

    As I have no notion in arabic I read your article with google translate. But, if I’m right, you doesn’t talk about the function pll_register_string which I’m trying to call from inside a widget method.

    Have you more information about this case?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Polylang] Use of pll_register_string inside Widget ???’ is closed to new replies.