I have a plugin YITH Wishlist in use and I want to override their translation with my own translation which I have included in my child theme.
So basically I created this folder: /mychildtheme/languages
and placed this file in it yith-woocommerce-wishlist-de_DE.mo
/ yith-woocommerce-wishlist-de_DE.po
.
Within my functions.php I did the following:
add_action( 'plugins_loaded', 'yith_load_textdomain' );
function yith_load_textdomain() {
unload_textdomain( 'yith-woocommerce-wishlist' );
load_plugin_textdomain( 'yith-woocommerce-wishlist', false, get_stylesheet_directory_uri() . '/languages' );
}
But this has no effect. Does somebody knows how I can override a plugin text domain with my custom translations?
Thanks!