mercredi 3 février 2016

qTranslate X and AJAX: language switch does not detect ajax-loaded URLs

I have a WordPress theme loading pages via AJAX, and require these pages to be both in English and German. I always use qTranslate for these cases, as I can quickly and manually populate the content in my languages of choice.

However, qTranslate X does not read the AJAX-updated URLs. Consider this example: User is on a given post (http://ift.tt/1VLKAu6) reading on German, as it is the default language. The user clicks on another post, going to http://ift.tt/20pYwRt. Being there, the user wants to read this "another post" in English, so the user clicks the English flag. Because http://ift.tt/20pYwRt was loaded via AJAX, qTranslate X takes the user to http://ift.tt/1Ph3WDA (or eg. http://ift.tt/1PzIb5D), as for the plugin, the URL is still http://ift.tt/1VLKAu6.

I am hoping someone has experience with this specific plugin and it running with AJAX calls. I am very new to AJAX, as I have never worked with it, so pardon for any stupid terms and/or thought-processes on my behalf.

If you require more information, please do let me know.

Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire