Forum Archive - Drupal Views pager with ajax shows results in english

Drupal Views pager with ajax shows results in english
Mar 29, 2016 10:35 am by sadashiv
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.
Re: Drupal Views pager with ajax shows results in english
Apr 2, 2016 12:49 am by Edvard
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!
Re: Drupal Views pager with ajax shows results in english
Apr 6, 2016 10:35 am by sadashiv
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.
Re: Drupal Views pager with ajax shows results in english
Apr 6, 2016 5:02 pm by Edvard
Good, it is working now. JSON translation was disabled for your domain, now it is enabled. Thanks!
Re: Drupal Views pager with ajax shows results in english
Apr 6, 2016 6:20 pm by sadashiv
I posted a patch at https://www.drupal.org/node/2701337#comment-11045485 May be you can include this in the module. Hth, Sadashiv.
Re: Drupal Views pager with ajax shows results in english
Apr 13, 2016 8:12 pm by Edvard
Thanks! I'll check and update.

SIMILAR TOPICS

How do I add Indian languages in Drupal GTranslate?Sep 18, 2011 6:10 amReplies: 26Post by: rag_gupta
AJAX requests sent to wrong (with language code) URLSep 27, 2018 10:16 amReplies: 3Post by: atriaforever
Shows all flags etc on top of page for 1 sec?May 2, 2017 11:15 amReplies: 1Post by: chrispl0
Drupal site: doGTranslate is not definedFeb 17, 2017 5:06 pmReplies: 10Post by: logicp
Product Pages working in English but not in other LanguagesFeb 25, 2017 3:32 pmReplies: 5Post by: GlennB

Try GTranslate with a free 15 day trial