[wp-trac] [WordPress Trac] #63335: load_plugin_textdomain not working anymore since wp 6.8
WordPress Trac
noreply at wordpress.org
Tue Apr 22 20:04:55 UTC 2025
#63335: load_plugin_textdomain not working anymore since wp 6.8
-------------------------------+------------------------------
Reporter: canic | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: 6.8
Severity: normal | Resolution: invalid
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by canic):
* status: new => closed
* resolution: => invalid
Comment:
Final update: We're using ACF PRO, and it seems there's a bug in ACF when
combining load_plugin_textdomain and register_block_type while using i18n
in blocks. I'm now creating a bug report in the ACF community.
Thanks anyway!
Replying to [comment:3 canic]:
> Small update:
> Found out when loading within "plugins_loaded" the language token get
succesffully loaded.
>
> When calling load_plugin_textdomain in the "init" action, the path
doesn't get modified to plugins/path/languages.
>
> Isn't init the right position to call load_plugin_textdomain? Or is it
too late.
>
> Replying to [comment:2 canic]:
> > Hey,
> >
> > thanks for your reply.
> >
> > You're right, it's just example code.
> >
> > I found out through WP Query Monitor that the .mo file is being
loaded, but when I check the "Doing it Wrong" tab, I see one message from
WP Core.
> > [[Image(https://i.ibb.co/wZBjbh4h/Screenshot-2025-04-22-212655.png)]]
> >
> > It's strange, because even when I remove load_plugin_textdomain and
rely on the header comment for loading the text domain, it still doesn't
work.
> >
> > Replying to [comment:1 swissspidy]:
> > > I hope this is just example code, but if your text domain is `sw-
immosuite`, then you should use that in the `load_plugin_textdomain()`
call. Not `'text-domain'`.
> > >
> > > If you otherwise have a minimal reproducible example code, e.g. in a
GitHub Gist or so, that would be helpful.
> > >
> > > I also recommend reading https://make.wordpress.org/core/2025/03/12
/i18n-improvements-6-8/ to learn more about changes in 6.8. Though
preventing translations from loading wouldn't be an intentional change :-)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63335#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list