Load textdomain from global languages directory

I am creating translations for my plugin.
To fetch .mo files from my-plugin/languages directory , I use the function

//Load translation
function load_plugin_textdomain() {
    load_plugin_textdomain( 'my-plugin', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
}
add_action( 'plugins_loaded', 'load_plugin_textdomain' );

How can i set the location to wp-content/languages
Setting the location to ABSPATH.'/wp-content/languages' doesn't work.

Topic textdomain translation plugin-development Wordpress

Category Web


If anybody else is looking for the anwser , Here it is

function load_txtdomain() {
    $locale = apply_filters( 'plugin_locale', get_locale(), 'my-plugin' );
    load_textdomain( 'my-plugin', WP_LANG_DIR . '/my-plugin-' . $locale . '.mo' );
}
add_action('plugins_loaded','load_txtdomain');

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.