I have created a wordpress plugin and inside it I used all strings like the following code:
_e( 'my plugin string - sample string', 'my-plugin' );
And also after all plugins loaded I call this code to register my text domain:
add_action( 'plugins_loaded', 'myplugin_load_textdomain' );
function myplugin_load_textdomain() {
load_plugin_textdomain( 'my-plugin' );
}
I use Polylang for translation. But when I came to Polylang->String Translation, I can not see my plugin strings?
I havent created po or mo files for my plugin. But I installed Loco translate. I came to plugins tab of Loco translate. I added a new languages(english and german) for my plugin. And after that Loco was able to see my strings used inside _e() function. Using Loco, I translated some strings to test. And Loco created english and german mo and po files for me. I saved the changes.
After this step I again came to see if polylang can see my string, and still can not see my strings. Also when I switch between english and german pages of my plugin at the frontend user interface, it does show same string for each language.
So, do you have any idea, where am I missing point? Any help is appreciated.
Thanks so much