如何启用WPML翻译我的内容小部件?
我正在开发WordPress插件,并想知道如何使用WPML从插件数据库表中翻译文本。
这是我希望WPML转换为多种语言的代码的示例:
echo esc_html_e('Contact with','my-plugin') ." ". esc_attr($name);
*$name it's called from my plugin table in WordPress Database*
如何将“与WPML的多种语言支持”翻译为“与”和$ name?
I'm developing a WordPress plugin and would like to know how I may translate a text from the plugin's database table using WPML.
Here's a sample of the code I want WPML to translate into multiple languages:
echo esc_html_e('Contact with','my-plugin') ." ". esc_attr($name);
*$name it's called from my plugin table in WordPress Database*
How do I translate "Contact with" and $name with WPML's multiple language support?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要使用 string translation 用于每个字符串的翻译。如果您一开始看不到字符串,则需要首先找到字符串。
有关更多详细信息,请查看 https://wpml.org.org/documentation/getting/getting/getting/getting/getting/getting of - 启动的指南/翻译 - 网络
You will need to use String translation for the translation of each string. If you don't see a string at first you will need to find the strings first.
For more details take a look at https://wpml.org/documentation/getting-started-guide/translating-widgets