• Resolved shaneonabike

    (@shaneonabike)


    Hey
    Thanks for creating an awesome plugin it integrates super well!
    One suggestion/question I have is the way that you have integrated translation. I don’t think it’s as smooth as it could be. Mainly, when I checkoff that i want WPML integration it disabled all the custom fields… why?

    You could just as easily pipe all the buttons, labels, and tabs through the __() and viola it’s integrated. I already modified your plugin to do this and it integrates and functions the way I would imagine it should out of the box. I could send you the code if you would like to push another release?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    Hey,

    the reason for disabling the button translations is because it causes issues when translating them in another language than English.

    For example, let’s say you want the website in German and French and you translate in the plugin’s interface “Billing” to “Rechnung” in German. Then you want to use WPML to further translate the website in French. The WPML plugin will find a string for “Billing”, but the __() will be applied on “Rechnung” and will not find the WPML translation for French.

    Maybe I’m overcomplicating it. You can send me your changes and I’ll check if it solves the aforementioned issue.

    Thread Starter shaneonabike

    (@shaneonabike)

    Hmmm…. well I set my system default to French and am translating to English. It seems to work just fine in this case. Anyway, translation should find the appropriate language based on the language of the user, page, et al. I’ll send these changes in the next bit here.

    Thread Starter shaneonabike

    (@shaneonabike)

    forms-buttons.php

               <?php if ( $show_login_step ) : ?>
                    <button id="wpmc-next" class="button button-active alt" type="button"><?php echo __($t_next, 'wp-multi-step-checkout'); ?></button>

    and the same for the second button

    form-tabs.php

    $steps = apply_filters( 'wp-multi-step-checkout-timeline', array(
      'login' => array(
        'order' => 0,
        'label' => __($t_login, 'wp-multi-step-checkout'),
      ),
      'billing' => array(
        'order' => 1,
        'label' => __($t_billing, 'wp-multi-step-checkout'),
      ),
      'shipping' => array(
        'order' => 2,
        'label' => __($t_shipping, 'wp-multi-step-checkout'),
      ),
      'order' => array(
        'order' => 3,
        'label' => __($t_order, 'wp-multi-step-checkout'),
      ),
      'payment' => array(
        'order' => 4,
        'label' => __($t_payment, 'wp-multi-step-checkout'),
      ),
    ));
    
    if ( !$show_shipping_step) unset($steps['shipping']);
    if ( !$show_login_step) unset($steps['login']);
    
    if ( $unite_billing_shipping ) {
        $steps['billing']['label'] = __($t_billing . ' & ' . $t_shipping, 'wp-multi-step-checkout');
        unset($steps['shipping']);
    }
    if ( $unite_order_payment) {
        $steps['order']['label'] = __($t_order . ' & ' . $t_payment, 'wp-multi-step-checkout');
        unset($steps['payment']);
    }
    
    ?>
    

    I also commented out the section you created with regards to the translation retrieval in form-checkout.php. Using it this way means that whatever the user provides is then properly translated through the system AND furthermore is done properly based on your code to combine the sections together.

    Plugin Author SilkyPress

    (@diana_burduja)

    Thank you. I’ll look into it when I have some time.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WPML Integration’ is closed to new replies.