[resolved] qTranslate and "infinite scroll" (8 posts)

  1. redsoulwarrior
    Posted 1 year ago #

    I'm setting up a site where the first 10 posts are getting parsed / translated correctly when the user first accesses the site / switches the language. Once he scrolls all the way to the 10th post, the next 10 posts will be loaded "dynamically" (often referred to as "infinite scroll" - this is accomplished with a couple of jQuery functions as far as I'm aware).

    These newly added posts will always show up in the default language rather than the language the user is currently using.

    I'm mostly OK with PHP, but I think I'd have to manipulate the jQuery functions in some ways to accomplish showing translated posts on the page and I'm not familiar with that. Does anyone have some advice for me how to accomplish this goal?

    Thanks in advance.


  2. Ai4President
    Posted 1 year ago #

    Zeig mal die Seite dann schau ich es mir mal an :D

  3. redsoulwarrior
    Posted 1 year ago #

    Hier siehst du die englische Seite: http://chronik.fraunhofer.de/?lang=en

    Ab dem 11ten Post tritt das Problem auf. Bei den Eintr├Ągen zuvor wird alles wie gesagt korrekt auf englisch ausgegeben.

  4. Frutke
    Posted 1 year ago #

    Er... English, folks.
    This is the English forum. :)

  5. redsoulwarrior
    Posted 1 year ago #

    I'm still having troubles and I would appreciate any help I can get. :)

  6. redsoulwarrior
    Posted 1 year ago #

    The theme designer got back to me and I changed a part in the header.php the following way...


    url: "<?php echo site_url() ?>/wp-admin/admin-ajax.php",

    url: "<?php echo site_url() ?>/wp-admin/admin-ajax.php?lang=<?php echo qtrans_getLanguage();?>",

    We'll have to apply another minor change so it will also work on mobile devices, but I hope this will already help some folks out there.

  7. Frutke
    Posted 1 year ago #

    Very helpful indeed!

  8. redsoulwarrior
    Posted 1 year ago #

    We did not have to apply another change in the source code. It turned out the issue was caused by a caching plug-in...

    I have always recommended not using them, this just proves again that they can easily mess up things.

    This issue is now solved. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.