Translation of Button with WPML
-
Hi,
We’ve tried to translate the button for rnquiry information with WPML an it’s impossible. I contacted with the people of WPML and they tell me that I must change the code. We sent me the changes but tell me, that obviously when the plugin be updated the cahnges dissapear and they suggest me that contact with creators of the plugin to send this changes and if you are OK, include in next updates.
The changes are:
A) Line 74: CHANGE:
<?php echo esc_html( $enq_btn_label ); ?>
FOR:
<?php esc_html_e( $enq_btn_label, 'WC Enquiry btn' ); ?>
B) Line 78: CHANGE:
<input type=”button” name=”contact” value=”<?php echo esc_attr( $enq_btn_label); ?>” class=”contact pe-show-enq-modal wpi-button single_add_to_cart_button button alt” />
FOR:
<input type=”button” name=”contact” value=”<?php esc_attr_e( $enq_btn_label,'WC Enquiry btn attr' ); ?>” class=”contact pe-show-enq-modal wpi-button single_add_to_cart_button button alt” />
C) Line 93 (this is what it solves): CHANGE
return empty( $form_data['custom_label'] ) ? esc_attr( __( 'Make an enquiry for this product', 'product-enquiry-for-woocommerce' ) ) : esc_attr( $form_data['custom_label'] );
FOR:
return empty( $form_data['custom_label'] ) ? esc_attr( __( 'Make an enquiry for this product', 'product-enquiry-for-woocommerce' ) ) : esc_attr( __($form_data['custom_label'],'WC Enquiry btn custom label setting' ) );Thanks!
The page I need help with: [log in to see the link]
- The topic ‘Translation of Button with WPML’ is closed to new replies.