Override parent theme translation on child theme

I have a parent theme that uses correctly load_theme_textdomain() to load all the translated strings in many languages.

Then I created a child theme that uses load_child_theme_textdomain() to achieve the same thing for its strings.

There are certain translated strings for a particular language on the parent theme that I’d like to replace/override in the child theme.

I know if they were on a template file I could replace the file and simply change the textdomain for those strings, but unfortunately the ones I’m talking about are used in many places and also in the dashboard (so inside some filter/action functions).

So my question is: is there a way to replace those translated strings inside the child theme without having to replace parent template files or functions?

I don’t know, maybe adding a parent-theme.mo file inside the languages folder of the child theme with only those strings translated, or something like that.

Read more here: Override parent theme translation on child theme

Leave a Reply

Your email address will not be published. Required fields are marked *