Translating Hours and contact widget

Support Area Forums Umami Translating Hours and contact widget

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question: http://http://http://saltandpepper.hr
  • Author
    Posts
  • #27204
    Goran Milic
    Participant

    Hello Bill,

    At the moment I am doing some translations with WPML and I realized that Hours and Contact widget is not translatable (I can translate the widget titles like “Title” or “Hours6” but not the value which I enter in those fields). I have found this reply on WPML forum:

    “If the widgets are using standard WP functions and getTExt calls, you should be able to translate all those strings from String Translation.”

    I am going to investigate a little bit more in order to be sure that I am doing the correct steps, but would like to hear your opinion because Hours and Contact is your custom widget?

    P.S. Web site is under maintenance mode.

    Thank you in advance.

    Edit: I have found something more:

    “Then probably the Widget doesn’t apply the filters as in this example:

    function widget( $args, $instance ) {
    extract($args);
    $title = apply_filters( ‘widget_title’, empty($instance[‘title’]) ? ” : $instance[‘title’], $instance );
    $text = apply_filters( ‘widget_text’, $instance[‘text’], $instance );
    }”

    #27206
    Bill Robbins
    Moderator

    Goran,

    I could be wrong, but can’t WPML use widget logic to display different widgets based on language? This was my understanding of how use different widgets for different languages with WPML: http://wpml.org/2011/03/howto-display-different-widgets-per-language/ .

    Take care,
    Bill

    #27210
    Goran Milic
    Participant

    Hello Bill,

    So the idea is to use widget logic plugin, then to make Hours and Contact widget for every language that I have and then check each widget to the related language?

    #27211
    Bill Robbins
    Moderator

    Hello Goran,

    That is correct. You can do that with most widgets too if you need to.

    Bill

    #27212
    Goran Milic
    Participant

    Yes, I installed widget logic, made a small test and everything works fine until now.
    I have no reason to believe that this will not work completely.
    Thanks Bill.

    #27213
    Bill Robbins
    Moderator

    That’s great news. If you need anything else, just let me know.

    Have a good evening,
    Bill

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Translating Hours and contact widget’ is closed to new replies.