• Resolved alm06130

    (@alm06130)


    I try to internationalize widgets, but get stuck on widgets made with new concepts as off v2.8.
    Translated texts in admin dashboard are ok, except for widget’s title in both list of widgets and control window.
    I read somewhere you have to use array($name,$textdomain) instead of $name to instantiate widget, but if I do that, “array” is displayed instead of title. If I pass $name2 as an option, $name2 is used as Title, but I cant see how to pass textdomain as argument.
    Anyone gets an idea?

Viewing 1 replies (of 1 total)
  • Thread Starter alm06130

    (@alm06130)

    Found solution, don’t understand yet!
    In widget class constructor, replaced:

    $this->WP_Widget(false, $name = __('Widget title','my_text_domain'));

    by

    $this->WP_Widget(false, __('Widget title','my_text_domain'));

    Then translate works well now.
    If some one can explain…

Viewing 1 replies (of 1 total)
  • The topic ‘widget translated title won't show on v3.0’ is closed to new replies.