Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I was updated on the forum that we need to enable json format translation when we use ajax. The documentation is at https://gtranslate.io/docs/58-gtranslate-tdn-documentation.
Would be great if the module can translate views ajax.
Thanks,
Sadashiv.
Comment | File | Size | Author |
---|---|---|---|
#4 | Views_ajax_support_for_translations-2701337-3.patch | 4.63 KB | omarlopesino |
Comments
Comment #2
sadashiv CreditAttribution: sadashiv commentedHi,
I think views is most common and I was able to get it translated using one hook. I am attaching a patch for the same.
Hth,
Sadashiv.
Comment #3
omarlopesinoThis does not work correctly in all cases because AJAX callbacks are made without using language prefix.
The AJAX call is still being made to /views/ajax or /system/ajax instead of /en/views/ajax or /en/system/ajax .
I upload a patch which hooks into jquery ajax prefilter event and add the prefix for the urls mentiones (/views/ajax , /system/ajax). It can be set up in the gtranslate config, in "Ajax paths" textarea.
Please review, thanks!
Comment #4
omarlopesinoUploading new patch, fixing some uses cases for ajax callbacks.