Translate strings not recognised in plugin

enter image description here

I am trying to translate my plugin strings, but for some reason my plugin does not find the strings via the _e() and __() functions.

My plugin directory is called test-plugin.

My plugin /test-plugin/test-plugin.php files looks as follows:

Plugin Name: Test plugin
Version: 1.0
Author: Robbert Vermeulen
License: GPL2
Text Domain: test-plugin

_e( 'This is a test text', 'test-plugin' );
__( 'This is another test text', 'test-plugin' )

function test_plugin_load_plugin_textdomain() {
    load_plugin_textdomain( 'test-plugin', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
add_action( 'plugins_loaded', 'test_plugin_load_plugin_textdomain' );


When I try to sync the strings the plugin only finds the values from my plugin description to translate.

What do I have to do so that the strings are recognized?

Read more here:: Translate strings not recognised in plugin

Leave a Reply

Your email address will not be published. Required fields are marked *