Translation .po file is not called

梦想与她 提交于 2019-12-25 04:14:30

问题


I can't translate my wordpress plugin.

I have my .po and .mo files inside the plugin-name/languages folder but it doesn't work. Does anyone have a clue on what could be missing?


Details:

I translated the theme using the .po and .mo files and adding define('WPLANG', 'pt_BR'); on wp-config.php. It works fine.

But not all website is translated. So I tried the same with the plugins, but even translating the plugin .pot and naming plugin-name-pt_BR.po and plugin-name-pt_BR.mo, and placing them on /plugin-name/languages (which already existed) as I saw on the internet, it didn't work.

I also tried copying the translations on plugin-name-pt_BR.po and pasting inside wp-content/themes/theme-name/languages/pt_BR.po, but it was not use.

I tried installing Loco-Translate and POEditor, but they only manage the .po translation, which is fine and translated, but not reflected on the website.

I don't know much of Wordpress and PHP, but it seems to me that the plugin code might lack something to call the .po file.

If I don't translate this way, I'll have to translate directly inside the plugin's source code.

来源:https://stackoverflow.com/questions/52336260/translation-po-file-is-not-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!