Support » Plugin: PPOM for WooCommerce » LocoTranslate String Translation?

  • Resolved WebHolism

    (@webholism)


    Hi,

    Thanks for the great plugin.

    I would really like to allow for the translation of:

    $ppom_input_vars[‘product_base_label’] = ppom_get_option(‘ppom_label_product_price’, ‘Product Price’);
    &
    $ppom_input_vars[‘option_total_label’] = ppom_get_option(‘ppom_label_option_total’, ‘Option Total’);
    in the inc/hooks.php file.

    I use LocoTranslate and this does not pick these up as translatable strings. Are you able to offer any assistance or advice on integration with this plugin? I see that you have recommended WPML in some other instances, but I have need for LocoTranslate, and would prefer not to have multiple translation plugins if I possibly can.

    Thank you so much for your time and advice in this matter.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Hi @nmedia,

    Same problem with version 18.5 as before I am afraid. I am seeing the translations in the administrator using the LocoTranslate method, but it seems that the Product Price and Option Total strings are being treated different in regards to their output as to prevent the language translation from happening. 🙁

    Any further recommendations are appreciated.

    Kind regards.

    Plugin Author N-Media

    (@nmedia)

    Well, sorry I can’t understand why locotranslate not picking these strings. Even we use proper functions like other strings.

    Hi @nmedia,

    Would it help if I set up a dev site to demonstrate the issue at all? Is there anything further that I can do to help progress the resolution of this problem?

    I appreciate your time and help in dealing with the problem that I am facing.

    Kind regards.

    Plugin Author N-Media

    (@nmedia)

    ok, setup and send.

    Hi @nmedia,

    I have set up a dev site for investigation into the issue.

    In the meantime I have also looked around at the problem code and I introduced the following at line 839 of /inc/arrays.php:

    $ppom_array = ppom_array_settings();
    $option_total = '';
    foreach ($ppom_array as $ppom_item) {
        if ($ppom_item['id'] === 'ppom_label_option_total') {
            $option_total = $ppom_item['default'];
        }
    }
    $js_vars['option_total_label'] = ppom_get_option('ppom_label_option_total', $option_total);

    This appears to resolve the problem, and picks up the translated string. This has been a quick patch, so I apologise if the code is messy. I just hope that my thinking is clear in my attempting to resolve the issue.

    Please send an email address if you need access to the dev site that has been created, and I await your continued assistance.

    Kind regards.

    Plugin Author N-Media

    (@nmedia)

    Hi,

    ok, we got some point out of this and updating our PPOM again today with same version 18.5, check it in couple of hours.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘LocoTranslate String Translation?’ is closed to new replies.