Localization Problem: Doesn’t Display Translated Words

First make sure the language file is found. In your development environment (and only there!) add the following code:

$path   = plugin_dir_path( __FILE__ ) . 'lang';
$loaded = load_plugin_textdomain( 'LSample', false, dirname( $path );

if ( ! $loaded )
{
    print "File not found: $path"; 
    exit;
}

Then … I would use lowercase text domains only. Not sure if that’s a real issue, but there are some cases where WordPress is setting strings to lowercase automatically. Strings not visible to the end user should stay lowercase.

The po file will not be used, you have to create a mo file after translation. Make sure to click the button. 🙂

enter image description here

Then reload, the strings should be translated now.

tech