• Resolved jaak69

    (@jaak69)


    Hello,

    I have ran into trouble with Polylang “Translate String” feature. (template Zerif Lite).
    Screenshots:
    https://www.ecoscooter.ee/wp-content/uploads/2017/StringTranslation.png
    https://www.ecoscooter.ee/wp-content/uploads/2017/StringTranslationFrontend.png

    Translatable strings are visible in backend and I can enter appropriate translation and save it. There is a payment gateway plugin with two strings (see screenshot). The first one “woocommerce_estcard_gateway_title” working as expected, but the second one “woocommerce_estcard_gateway_description” show on frontend only default language (estonian) in all languages.

    Code which producing these strings are:

     'title' => array(
                            'title' => __('Title', 'woothemes'),
                            'type' => 'text',
                            'description' => __('This controls the title which the user sees during checkout.', 'woothemes'),
                            'default' => __('Tasun krediitkaardiga', 'woothemes')
                        ),
                        'description' => array(
                            'title' => __('Description', 'woothemes'),
                            'type' => 'textarea',
                            'description' => __('This controls the description which the user sees during checkout.', 'woothemes'),
                            'default' => __("Description", 'woothemes')

    How can i solve this problem
    Jaak

    • This topic was modified 7 years, 11 months ago by jaak69.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    Hi,
    Your screenshots aren’t work…

    You must use pll__(); functions in place of __(); if you want translate text by polylang.

    Thread Starter jaak69

    (@jaak69)

    Hello,

    Thank for your answer.

    Screenshots are now working.

    'description' => array(
                            'title' => __('Description', 'woothemes'),
                            'type' => 'textarea',
                            'description' => __('This controls the description which the user sees during checkout.', 'woothemes'),
    changed code-><strong> 'default' => pll__("Description", 'woothemes')</strong>

    But this doesn’t help. And the second question. Why it’s working in one place (title) and not on another place (description)? Both fields have coded in __() way.

    Jaak

    Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    what version of plugin do you have at now?

    Plugin Author Marcin Kazmierski

    (@marcinkazmierski)

    It is everything alright, right?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Polylang translated strings don’t show on frontend’ is closed to new replies.