[wp-trac] [WordPress Trac] #52656: Inconsistency in the name of the .mo file that is expected by a theme and plugin

WordPress Trac noreply at wordpress.org
Thu Feb 25 16:28:52 UTC 2021


#52656: Inconsistency in the name of the .mo file that is expected by a theme and
plugin
-------------------------+------------------------------
 Reporter:  sudar        |       Owner:  (none)
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:  trunk
 Severity:  normal       |  Resolution:  worksforme
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 Thanks for the ticket!

 Replying to [ticket:52656 sudar]:
 > It would be nice to have a consistent naming convention between theme
 and plugin or at least provide a way to override the expected .mo file
 name using a filter.

 As noted above, this was improved for files loaded from the `wp-
 content/languages` directory in [37414] / #34213, they all have a
 consistent name of `{text-domain}-{locale}.mo`.

 You can also use the
 [https://developer.wordpress.org/reference/hooks/load_textdomain_mofile/
 load_textdomain_mofile] filter to override the expected `.mo` file name.

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


More information about the wp-trac mailing list