Connects the specified translation file.
The function parses the .mo file specified in the parameters and adds the data from it to the WordPress translation data – to the $l10n global variable:
<?php /* Plugin Name: My Plugin Plugin URI: https://mypluginsite.com/ Description: One of best plugins in the planet Version: 1.0 Author: John Author URI: https://facebook.com/john Licence: GPLv2 or later Text Domain: myplugin Domain Path: /lang */ function load_text_domain() { load_plugin_textdomain( 'myplugin', false, dirname(plugin_basename((__FILE__)).'/lang'), ) } add_action('plugins_loaded', 'load_text_domain');