Skip to content Skip to sidebar

Resolved by author

Overview of the issue

When using Directorist, certain text strings such as “Listings Found” from the plugin’s Gutenberg blocks and Elementor widgets are not translatable with WPML. This happens because the newer widgets and blocks introduced by Directorist do not include the necessary XML configuration.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Go to WPML → Settings → Custom XML Configuration.
  • Add the following XML code and save it:
    <wpml-config>
      <elementor-widgets>
        <widget name="directorist_all_listing">
          <fields>
            <field>header_title</field>
          </fields>
        </widget>
        <widget name="directorist_search_listing">
          <fields>
            <field>title</field>
            <field>subtitle</field>
            <field>search_btn_text</field>
            <field>more_filter_btn_text</field>
            <field>more_filter_reset_btn_text</field>
            <field>more_filter_search_btn_text</field>
          </fields>
        </widget>
        <widget name="directorist_search_result">
          <fields>
            <field>header_title</field>
          </fields>
        </widget>
        <widget name="directorist_category">
          <fields>
            <field>header_title</field>
          </fields>
        </widget>
        <widget name="directorist_location">
          <fields>
            <field>header_title</field>
          </fields>
        </widget>
        <widget name="directorist_tag">
          <fields>
            <field>header_title</field>
          </fields>
        </widget>
       <widget name="directorist_user_login">
          <fields>
            <field>signin_username_label</field>
            <field>signin_button_label</field>
            <field>recovery_password_label</field>
            <field>recovery_password_description</field>
            <field>recovery_password_email_label</field>
            <field>recovery_password_email_placeholder</field>
            <field>recovery_password_button_label</field>
            <field>signup_label</field>
            <field>signup_linking_text</field>
            <field>author_role_label</field>
            <field>user_role_label</field>
            <field>username_label</field>
            <field>password_label</field>
            <field>email_label</field>
            <field>website_label</field>
            <field>firstname_label</field>
            <field>lastname_label</field>
            <field>bio_label</field>
            <field>privacy_label</field>
            <field>privacy_linking_text</field>
            <field>terms_label</field>
            <field>terms_linking_text</field>
            <field>signup_button_label</field>
            <field>signin_message</field>
            <field>signin_linking_text</field>
            <field>active_form</field>
          </fields>
        </widget>
      </elementor-widgets>
    </wpml-config>
            

2 Responses to “[Directorist] – Gutenberg Blocks/Elementor Widgets Cannot Be Translated”

  1. This issue has been completely fixed. The latest version of the Directorist WPML Integration plugin includes a full solution for this problem.

    **What was done:**

    1. **Gutenberg Blocks Translation**: All Directorist Gutenberg blocks (search-listing, all-listing, search-result, category, location, tag, account-button, search-modal) are now fully translatable. The plugin’s wpml-config.xml file has all blocks properly configured.

    2. **Elementor Widgets Translation**: All Directorist Elementor widgets will now automatically translate via WPML String Translation.

    3. **Runtime Translation**: The plugin now translates block attributes and widget settings at runtime, so strings like “Listings Found” will automatically translate.

    **How it works:**

    – Plugin automatically registers strings with WPML String Translation
    – Block attributes (like header_title, search_bar_title, more_filters_text) are translated
    – Elementor widget settings are translated
    – No manual XML configuration needed – everything is automatic

    **Verification:**

    You can now:
    1. Set custom text in a Gutenberg block (e.g., “Listings Found”)
    2. Check WPML String Translation → Strings – the string will be automatically registered
    3. Add translation
    4. See translated value on frontend

    This issue is now completely resolved. No workaround or manual XML configuration is needed.

    Thank you!

    • Thanks Yousuf for the detailed report and for your work in maintaining compatibility with WPML. We truly appreciate it. I’ll go ahead and close this errata.