Open dingo-d opened 1 week ago
WP 6.7 caused some weird translation issues, which got me looking into how the translations are handled in the libs.
Long story short, the translation class (I18nExample) is only valid for the themes, not plugins.
I18nExample
loadThemeTextdomain
init
after_setup_theme
load_plugin_textdomain
load_theme_textdomain
I think you could create two examples, one for a theme and another for a plugin, and then in the CLI use one or the other.
WP 6.7 caused some weird translation issues, which got me looking into how the translations are handled in the libs.
Long story short, the translation class (
I18nExample
) is only valid for the themes, not plugins.loadThemeTextdomain
) should be hooked toinit
, notafter_setup_theme
load_plugin_textdomain
function, notload_theme_textdomain
(there's a difference)I think you could create two examples, one for a theme and another for a plugin, and then in the CLI use one or the other.