• Resolved trelam

    (@trelam)


    Hi!
    Great plugin, thank you!
    How I can translate DOWNLOAD button?
    I tried with Say What? will no luck.
    Many thanks in advance.
    Marcin

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dotstore

    (@dots)

    Hello trelam,

    Thanks for reaching out to us.

    Can you please below support link in which we have provided the solution.

    View thread.

    Please apply the steps mentioned in above thread link and let us know still if any.

    Thanks,

    Thread Starter trelam

    (@trelam)

    Thank you!

    WEBHAUS

    (@webhaus)

    Hello,

    Solution works, but it is not wise to change anything under plugin directory which is installed from WordPress repository (next release of the plugin will come and the “solution” for this user is gone, because files will get overwritten).

    The problem actually lies in the improper usage of text domains, which are not intended to be used as variables or constants but strings. When a variable or constant is used as a textdomain, many on-site translation tools will fail to recognize it, because they do not parse PHP. Technically ofcourse this method will work, but it is much less friendly, and the only reason developers choose to use it – is to avoid copy-pasting textdomain again and again, and again (which is actually what everyone should do).

    For example, file “class-woocommerce-product-attachment-public.php” contains this code on line 668:

    esc_html_e( 'Please Login To Download Attachment', $wcpoa_text_domain );

    Because of variable $wcpoa_text_domain, it is not recognized in latest WPML release (and most probably Loco Translate does not recognize it too). When we change it to:

    esc_html_e( 'Please Login To Download Attachment', 'woocommerce-product-attachment');

    Everything works great! Anyway @dots, thank you for your wonderful work on the plugin, I hope that my advice will be useful to you.

    For the user I can currently recommend to add a few thousands to the plugin version number so you dont accidently update it, when the new release is out and you get a notification.

    Regards,
    Edgars from WEBHAUS

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Download button translation’ is closed to new replies.