Plugin localization

Trying to localize @MWDelaney plugin for CPT and set up its language directory:

/*
* Text Domain: sj-CPT
* Domain Path: /languages
*/

namespace MWD\ExampleCPT;

function sj_load_textdomain() {
  load_plugin_textdomain( 'sj-CPT', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
add_action( 'init', __NAMESPACE__ . '\\sj_load_textdomain' ); 

https://bitbucket.org/aitormendez/superbiajuridico/src/e47943764d7f31712b3f2be6b4807b60c38523af/web/app/plugins/roots-example-cpt-master/plugin.php#lines-16

The file sj-CPT-es_ES.mo is loaded only from web/app/languages/plugins but not from languages directory inside plugin. Is there something Bedrock or Sage related Iā€™m missing?

1 Like