WordPress and Ajax

Popular automatic website translation tool

WordPress and Ajax

Postby jdgrimes » Tue Oct 14, 2014 7:25 pm

Hello,

We are using GTranslate Pro on a WordPress site. It is working, but I have a question regarding translating content that is loaded via Ajax requests. This page is an example. The content is translated, but when the search filters are refreshed with an Ajax request, they are not translated. Can GTranslate translate content retrieved using Ajax requests? If not, would it be possible for me to implement that? (I know PHP.)
jdgrimes
 
Posts: 2
Joined: Tue Oct 14, 2014 7:10 pm

Re: WordPress and Ajax

Postby Edvard » Tue Oct 14, 2014 7:30 pm

Hi,

I just wanted to check your ajax requests and they give me 500 server error.

The general rule is if the ajax response is in HTML it will be translated, you just need to make sure that the ajax request goes to the URL with the language code. If the response is in JSON format, it will not be translated, because there is no general rule what to translate inside JSON object to not break it.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: WordPress and Ajax

Postby jdgrimes » Wed Oct 15, 2014 12:00 am

Thank you for the explanation.

How would I get the language code in the PHP so that I can add it to the Ajax URL?

I am not able to reproduce the 500 response for the Ajax requests. :S
jdgrimes
 
Posts: 2
Joined: Tue Oct 14, 2014 7:10 pm

Re: WordPress and Ajax

Postby Edvard » Wed Oct 15, 2014 2:30 am

Please check get-null-empty-wordpress-pro-version-t3731.html to find that out.

It still responds with 500 errors for me.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4183
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest

2GLux
cron