WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. redsoulwarrior
    Member
    Posted 5 months 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.

    https://wordpress.org/plugins/qtranslate/

  2. Ai4President
    Member
    Posted 5 months ago #

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

  3. redsoulwarrior
    Member
    Posted 5 months 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
    Member
    Posted 5 months ago #

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

  5. redsoulwarrior
    Member
    Posted 5 months ago #

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

  6. redsoulwarrior
    Member
    Posted 5 months ago #

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

    from:

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

    to:
    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
    Member
    Posted 5 months ago #

    Very helpful indeed!
    Thanks.

  8. redsoulwarrior
    Member
    Posted 5 months 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. :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.