开发者

WPML plugin translation

This question's quite stupid, but I'm having trouble getting wpml to translate my plugin. Every translatable string is surrounded by 开发者_Go百科__() calls and they appear POedit, I added translation for a couple of strings and they don't appear.

Translation for the theme is working OK.

I'm sure I'm missing something very stupid like a filename somewhere, or some function call, or something, I've read every piece of documentation I've found and I think it's confused me more. I read that you need to call setlocale, but I'm guessing wpml does that.. what might I be missing?


Is the plugin loading the .mo file? http://codex.wordpress.org/Function_Reference/load_plugin_textdomain


You might also want to check this FAQ page to see different reasons for String Translation not being applied: http://wpml.org/faq/language-setup/


I was missing the second parameter in the __() calls, the textdomain name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜