Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro datepicker not translated

Viewing 9 posts - 1 through 9 (of 9 total)
  • Virginie Raust
    #216706

    Hi,

    data-lang-code is not set if we don’t use WPML, so datepicker is not translated.

    I find the problem. It’s in class-search-filter-display-shortcode.php on line 669.

    $lang_code = "";

    By default, $lang_code should be set to wordpress language.

    Thanks

    Trevor Moderator
    #216710

    I will pass this to the plugin developer, Ross, for you.

    Ross Moderator
    #217133

    Hi Virginie

    I just did a test, and when no language code is set, it should by defalt load the correct langauge (because WordPress loads the jQuery javascript already in the correct language, I think).

    What happens if you change $lang_code = ""; to

    $lang_code = strtolower(substr( get_bloginfo ( 'language' ), 0, 2 ));

    Does it then work for you?

    Thanks

    Virginie Raust
    #217178

    Hi Ross,

    yes it works. Thanks

    I did some tests, and find that if I check “lazy load javascript”, WordPress doesn’t load the datepicker translation. I don’t know why.

    Virginie Raust
    #217185

    when enqueuing scripts in the shortcode, the hook ‘wp_enqueue_scripts’ has already occurred. This hook is used to load datepicker translation.
    adding
    wp_localize_jquery_ui_datepicker();
    after
    wp_enqueue_script( 'jquery-ui-datepicker' );
    in class-search-filter-display-shortcode.php line 533
    do the trick

    Ross Moderator
    #217416

    Good catch! I’ll do some tests and likely include in our next update.

    Thanks

    Virginie Raust
    #263366

    Hi Ross,

    why $lang_code = strtolower(substr( get_bloginfo ( 'language' ), 0, 2 )); has been double slashed

    in class-search-filter-display-shortcode.php line 681

    date picker is not translate after ajax query

    Ross Moderator
    #263464

    Hi Virginie

    I think what happened was I was testing with it, but it never made it to release so left it like this…

    We should have an update ready next week – I will uncomment this line for that release.

    Thanks

    Ross Moderator
    #266871

    Hi Virginie

    As per the last update of our plugin, this line was re-enabled.

    I will go ahead and close this ticket unless I hear back from you.

    Best

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.