Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

126
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda