Wordpress - Plugin translation not working

孤人 提交于 2019-12-24 10:20:05

问题


My plugin name is eventcal.Textdomain is eventcal. I have a language pack in /languages/ folder - eventcal-pt_BR.po and eventcal-pt_BR.mo. I have added plugin textdomain function

public static function eventcalLoadTextdomain() {
  load_plugin_textdomain( 'eventcal', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 
}

// in __constructor()
add_action( 'init', array(self::getInstance(), 'eventcalLoadTextdomain' ));

but its not working when i am changing my site language to portugese( Brazil )

Nothing is changing.everything is in english. How can i check plugin textdomain is working or not??

I also tried get_plugin_data( __FILE__ ); but not working

来源:https://stackoverflow.com/questions/54016305/wordpress-plugin-translation-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!