`wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin

I have no words 🤦‍♂️

A simple change

  • dirname(plugin_basename(__FILE__)) . '/languages/' inside wp_set_script_translations() function (3rd argument)

to

  • plugin_dir_path(__FILE__) . 'languages/'

fixed the problem

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)