Skip Navigation

This topic contains 0 replies, has 1 voice.

Last updated by Nikhil Vishwanath 3 days, 21 hours ago.

Assisted by: Shekhar Bhandari.

Author Posts
January 22, 2025 at 8:13 am #16621398

Nikhil Vishwanath

Background of the issue:
I am developing a site and using jQuery AJAX to fetch a particular text and display it on a page. I pass the text as a response to the AJAX request on success. I want this text to be translatable in the string translations. I found some documentation here: https://wpml.org/documentation/support/translating-the-theme-you-created/#wrap-all-texts-in-gettext-calls

Symptoms:
I need to make the text fetched via AJAX, translatable using WPML string translations.

Questions:
How can I make text fetched via AJAX translatable using WPML?
Is there a specific method to wrap AJAX response text for translation?

The topic ‘[Closed] Translating custom text in our site using ajax’ is closed to new replies.