[wp-trac] [WordPress Trac] #54797: Allow languages path in register_block_type

WordPress Trac noreply at wordpress.org
Tue Feb 8 12:13:09 UTC 2022


#54797: Allow languages path in register_block_type
-----------------------------+------------------------------
 Reporter:  Rahe             |       Owner:  gziolo
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  I18N             |     Version:  5.9
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------
Changes (by gziolo):

 * owner:  (none) => gziolo
 * status:  new => assigned


Comment:

 > An alernative to consider is to detect whether a script is registered
 inside a plugin (vs core block) and pass the custom path based on the
 setting read from the domain path set in the plugin metadata. More about
 that in https://developer.wordpress.org/plugins/internationalization/how-
 to-internationalize-your-plugin/#domain-path.

 It might be challenging to read the domain path provided in the plugin's
 metadata because `get_plugin_data()` is defined only in the admin but not
 on the frontend.

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


More information about the wp-trac mailing list