Topic: Qtranslate multi-language not working | WP Masonry Layout

Qtranslate multi-language not working

Home Forums Lite Version Qtranslate multi-language not working

This topic contains 7 replies, has 2 voices, and was last updated by  Paul 1 year, 8 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3836 Reply

    petri

    Hi,
    I’m using (m)qtranslate for multi-language websites.
    I translated the posts and the excerpts as well. However the posts in the Masonry aren’t displayed in the other languages (only in the first language).

    Do you have a solution?
    Thanks!

    #3860 Reply

    Masonry Guy
    Keymaster

    Hi Petri,

    Can you please send me your wp-admin details at info (@) masonrylayout (d0t) com with this thread url ?

    Thanks

    #4534 Reply

    Paul

    Any solution to this?

    #4545 Reply

    Masonry Guy
    Keymaster

    Hi Paul,

    Petri didn’t replied back so i didn’t have any chance to check on this.

    Can you please kindly send me your wp-admin details at info (@) masonrylayout (d0t) com with this thread url ?

    Thanks

    #4553 Reply

    Paul

    I am sorry but I am not authorized to share the details. However, I’ve noticed that it has something to do with the ajax loading. Pages/posts loaded don’t get the ?lang=en suffix.

    #4554 Reply

    Paul

    I’ve just found the solution. Maybe you can implement it in the next update.

    In /wp-masonry-layout/includes/client/wml_container.php there is a variable $link = admin_url(‘admin-ajax.php?action=wml_load_posts&shortcodeId=’.$shortcodeId), which always calls default language of admin-ajax.php instead of admin-ajax.php?lang=<current qtranslate> lanaguage.

    My Solution:

    global $q_config;
    $currentWebsiteLanguage = $q_config[‘language’];
    $link = admin_url(‘admin-ajax.php?lang=’.$currentWebsiteLanguage.’&action=wml_load_posts&shortcodeId=’.$shortcodeId);

    Hope it helps.

    #4559 Reply

    Masonry Guy
    Keymaster

    Hi Paul,

    Glad you have fixed it and thank you so much for sharing it here. I will work on this and use it in next release.

    Thanks 🙂

    #4698 Reply

    Paul

    Hello again,
    I’ve just found another missing component regarding qTranslate, which I fixed. When you change the language the permalinks to posts do not change. The solution:

    in /wp-masonry-layout/themes/default/layout.php

    <?php
    global $q_config;
    $currentWebsiteLanguage = $q_config[‘language’];
    ?>

    And after that modify the links like ?lang=<?php echo $currentWebsiteLanguage; ?>”><?php the_post_thumbnail($shortcodeData[‘wmlo_image_size’]); ?>

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Qtranslate multi-language not working
Your information: