Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Connection of my translations
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by WCFM Forum.
- AuthorPosts
- September 29, 2019 at 8:03 pm #84364PATselovParticipant
The plugins use not very high quality translations. I made my own language files, put them in the wp-content / languages / plugins folder
But I have a problem with these files.
To connect translations in a child theme, I try to disconnect your file first, then connect mine and only then connect your file.
Connection is obtained but disconnection does not work.
How to fix a function in a child theme?add_action('init', 'unload_load_textdomain'); function unload_load_textdomain(){ unload_textdomain('wc-multivendor-marketplace'); $locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale(); load_textdomain( 'wc-multivendor-marketplace', ABSPATH . 'wp-content/languages/plugins/wc-multivendor-marketplace-ru_RU.mo'); load_textdomain( 'wc-multivendor-marketplace', ABSPATH . 'wp-content/plugins/wc-multivendor-marketplace/lang/wc-multivendor-marketplace-'.$locale.'.mo'); }
- September 30, 2019 at 3:33 pm #84524WCFM ForumMember
HI,
Please use this translation tool – https://wordpress.org/plugins/loco-translate/
You do not have to make any such adjustment from child theme.
Thank You
- September 30, 2019 at 6:22 pm #84549PATselovParticipant
Loco Translate plugin doesn’t suit me.
I need a translation that this plugin cannot do. That’s why I do the translation myself.
I need your file to load after my file. - October 3, 2019 at 11:16 pm #84971WCFM ForumMember
OK, still you do not have to write any such for this at child theme’s functions.php
Just place you translation file here =
WP_LANG_DIR . "/plugins/wc-multivendor-marketplace-$locale.mo"
wc-multivendor-marketplace-$locale.mo – your translation file, “$locale” will be your lang code.
Thank You
- AuthorPosts
- The topic ‘Connection of my translations’ is closed to new replies.