[wp-trac] [WordPress Trac] #58848: `wp_set_script_translations` only sets translations for the default language

WordPress Trac noreply at wordpress.org
Wed Jul 19 10:58:10 UTC 2023


#58848: `wp_set_script_translations` only sets translations for the default
language
-------------------------------+------------------------------
 Reporter:  dathix             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  I18N               |     Version:  6.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by dathix):

 I used `wp_set_script_translations` inside the `wp_enqueue_scripts`
 filter. The provided path contains JSON files in two different languages
 but the translations script tag always contains the default language as of
 6.2. Everything worked fine in 6.1.3 and there were no changes to the
 code.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58848#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list