Support » Plugin: Toolbar Extras for Elementor & More - WordPress Admin Bar Enhanced » Unload translations for Premium Addons

  • Resolved webmastermd


    for some reason the unload translations seems not to work for the free part of the Premium Addons for Elementor extension. The Premium Addons Pro widgets are in English but not the free ones. All other widgets (Elementor (Pro) and Ultimate Addons) are in English.
    Can you look into this?

    Thanks and best regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Decker


    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:

    –> 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

    Plugin Author David Decker


    Hi again!

    Just an update regarding my answer from yesterday – this snippet was untested above:
    it contained a typo, that was corrected already.
    However, this snippet could not worked as “Premium Addons” does translation loading different – at another priority.

    Therefore, the filter in Toolbar Extras does not work – we have to use other unloading function. I fully updated the snippet — now it only works for this plugin “Premium Addons” and its Pro Add-On also.

    The snippet contains 2 different versions – the second one also uses the functions from Toolbar Extras to use the context of logged-in admin user.

    Please, only use ONE of the versions provided in the snippet link.

    Thanks, this works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unload translations for Premium Addons’ is closed to new replies.