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.