Load textdomain from global languages directory
Question
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.
0
plugin-development, textdomain, translation
6 years
2016-10-29T05:47:17-05:00
2016-10-29T05:47:17-05:00 0 Answers
82 views
0
Leave an answer