Reply To: Qtranslate multi-language not working | WP Masonry Layout

Reply To: Qtranslate multi-language not working

Reply To: Qtranslate multi-language not working

Home Forums Lite Version Qtranslate multi-language not working Reply To: Qtranslate multi-language not working

#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.