@webmastermd
Hi Manuel, and thanks for your feedback.
This feature of unloading translations does only officially work for these plugins (textdomains) out of the box:
– Elementor (free)
– Elementor Pro
– Toolbar Extras itself
And for these there 2 settings to trigger the unload. Elementor + Elementor Pro are combined otherwise it would be senseless ??
Other plugins are not supported for this – because it would be way too much work to test all this and make extra settings for it. Reminder: Toolbar Extras currently supports more than 100 different Elementor Add-Ons…!
BUT: There is a solution because I included a filter in this feature where any textdomain (of any plugin) can be hooked in. So here I made you a custom snippet which is to be found here:
https://gist.github.com/deckerweb/af1b2d549fc33e0f04bdcea277aef6ba
–> insert it in “Code Snippets” plugin (recommended!) or functions.php of your theme
–> only copy the code starting from line 6, with if...
You could also add more textdomains to it from other plugins, so the array in the snippet could also be as this:
$pa_domains = array( 'premium-addons-for-elementor', 'another-textdomain', 'yet-another-textdomain' );
You only would have to find out the textdomain any plugin is using.
NOTE: A lot of plugins are not properly prepared for translation and have wrong textdomains or other issues. In such cases the whole feature cannot work. The feature will only work if a plugin (like Elementor, or my own) clearly follows the default translations standards of WordPress and PHP.
And last note, the feature of unloading translations will only work for logged-in users, and for admins currently, that means users with capability manage_options
. The capability could also be filtered, with my filter tbex_filter_capability_unloading_translations