跳转至内容 跳转至侧边栏
Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

支持人员时区: Asia/Kathmandu (GMT+05:45)

本主题包含 0 則回覆 ,有 1 嗓音 。

最后由 Nikhil Vishwanath 6 months, 3 weeks前 更新。

协助者:: Shekhar Bhandari.

作者 帖子
22 1 月, 2025 于 8:13 上午 #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?

主题 “[關閉] Translating custom text in our site using ajax” 已关闭,不接受新回复。