Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
Wordpress i18n JavaScript text not translating

I'm preparing a wordpress site for localisation. I've generated the pot, po and mo files and have gotten the translation working for the php files. However the text from the javascript files doesn't get translated.

When generating the .po file from the .pot, it does find the strings in the javascript files.

The javascript fragment:

let message = __("Some text",'fiboo-plugins');

$('<div id="participant-changed-message">' +
message
+ '</div>').insertBefore('table');

The php fragment where the script is enqueued:

wp_enqueue_script( 'fca-participants', plugins_url('/fiboo-plugins/fiboo-custom-account/public/participants/list/participants.js'), array( 'jquery', 'wp-i18n' ), NULL, true );
wp_set_script_translations('fca-participants', 'fiboo-plugins', plugin_dir_path(dirname(__FILE__) ). '/fiboo-plugins/languages/');

The php fragment where to text domain is loaded:

function load_fiboo_textdomain() {
   load_plugin_textdomain('fiboo-plugins', false, basename( __DIR__ ) . '/languages/'  );
}
add_action( 'plugins_loaded', 'load_fiboo_textdomain', 0 );
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!