跳过导航

Waiting for author

Overview of the issue

When using Houzez Theme, some strings and widgets cannot be translated, namely :
– Houzez Contact Form > Sumbit buttom
– Houzez Grid Builder > URLs
– Submit button from comments.php (Post comments form)

Workaround

1- For Grid Builder and Contact Form widgets, add the following XML in WPML > Setting > Custom XML Configuration:


<wpml-config>
  <elementor-widgets>
    <widget name="houzez_elementor_contact_form">
      <fields>
        <field>form_name</field>
        <field>form_fields</field>
        <field>button_text</field>
        <field>email_to</field>
        <field>email_subject</field>
      </fields>
      <fields-in-item items_of="form_fields">
        <field>field_label</field>
        <field>placeholder</field>
      </fields-in-item>
    </widget>
    <widget name="Houzez_elementor_grid_builder">
      <fields>
        <field>image>url</field>
        <field>image>alt</field>
        <field>grid_title</field>
        <field>grid_subtitle</field>
        <field>more_text</field>
        <field type="LINK">more_link>url</field>
        <field>more_text_d</field>
        <field>properties_text</field>
        <field>property_text</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>
 

Then apply a small edit to the post for these new fields to load in the translation editor.

2- For the “Submit” button :

  • Open ../wp-content/themes/houzez/comments.php
  • Look for “submit-button” in line 55
  • Replace
    value="%2$s" 

    with

    value="%4$s" 
  • The code should look like this after the change :

    'submit_button' => '<input style="text-transform:capitalize;" name="submit" type="submit" id="submit" class="submit btn btn-primary" value="%4$s">', // Customize the button class

留下回复

紧扣主题并尊重他人。如果您需要帮助解决与本帖无关的问题,请使用我们的 Support Forum 开始聊天或提交票据。

您可以使用这些标签:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>