Drupal Views pager with ajax shows results in english

Popular automatic website translation tool

Drupal Views pager with ajax shows results in english

Postby sadashiv » Tue Mar 29, 2016 2:35 pm

Hi,

I have few pages made using views and they use a ajax pager. These pages show results in other language. eg. If I view the page at http://de.gokhalemethod.com/Nachrichten (german version of the site) and go to "Artikel" ie. Articles tab on the page, I see all contents in german but when I use the pager at the end of the page it shows the next page in english.

I think because the ajax is not translated. Would like to know how to fix this?

Thanks,
Sadashiv.
sadashiv
 
Posts: 73
Joined: Thu Oct 09, 2014 2:02 pm

Re: Drupal Views pager with ajax shows results in english

Postby Edvard » Sat Apr 02, 2016 4:49 am

Hi,

It sends an ajax request to http://de.gokhalemethod.com/views/ajax page which responds in JSON format.

We have JSON format translation support, however it requires additional coding on your end. You can check our documentation to find more info and examples:
https://gtranslate.io/docs/58-gtranslat ... umentation -> Enable JSON format translation

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: 4349
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Drupal Views pager with ajax shows results in english

Postby sadashiv » Wed Apr 06, 2016 2:35 pm

Hi,

Would like to know how I can test it. I gave it a try. If you open http://de.gokhalemethod.com/Nachrichten and goto "Artikel" and at the end of the page use the pager. It invokes ajax and drupal returns array of ajax commands. The third element has html which gets replaced and it's in "data" index. I modified that to have gt_translate_keys and set it to {key:"data", format:"html"}, Still it is not translating. Don't know how to debug this. Would be great if you can check and update what is wrong.

Thanks,
Sadashiv.
sadashiv
 
Posts: 73
Joined: Thu Oct 09, 2014 2:02 pm

Re: Drupal Views pager with ajax shows results in english

Postby Edvard » Wed Apr 06, 2016 9:02 pm

Good, it is working now. JSON translation was disabled for your domain, now it is enabled.

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: 4349
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: Drupal Views pager with ajax shows results in english

Postby sadashiv » Wed Apr 06, 2016 10:20 pm

I posted a patch at https://www.drupal.org/node/2701337#comment-11045485 May be you can include this in the module.

Hth,
Sadashiv.
sadashiv
 
Posts: 73
Joined: Thu Oct 09, 2014 2:02 pm

Re: Drupal Views pager with ajax shows results in english

Postby Edvard » Thu Apr 14, 2016 12:12 am

Thanks! I'll check and update.
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: 4349
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 2 guests

2GLux
cron