This post is part of the sub-series on Internationalizing a ClassicPress plugin which is part of the Internationalizing a ClassicPress plugin series.
With the strings of a plugin internationalized, the final step in the internationalization of a plugin, is to add the action to load the translation file:
function myclassicpressplugin_init() {
$plugin_rel_path = basename(dirname(__FILE__)).'/languages'; /* Relative to WP_PLUGIN_DIR */
load_plugin_textdomain('my-classicpress-plugin', false, $plugin_rel_path);
}
add_action('plugins_loaded', 'myclassicpressplugin_init');