• Resolved digital-workshop

    (@digital-workshop)


    Hello,
    how can i translate the Text from the Payment Gateways?

    I use WPML and can´t switch language on the Settings Page under Payment Gateway.

    I want to translate the Text for the Offline Payment

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    Hmmm… we recently did some significant updates to be fully compatible with WPML. You might reach out to them as well because this might be related to their plugin instead of ours.

    But generally, you can always change the gateway text with this snippet:

    function my_custom_gateway_labels( $gateways ) {
    	// add the following 4 lines to change the label for Offline Donations
    	$gateways['offline'] = array(
    		'admin_label'    => 'CUSTOM ADMIN LABEL',
    		'checkout_label' => __( 'CUSTOM FRONTEND LABEL', 'give' ),
    	);
    
    	return $gateways;
    }
    add_filter( 'give_payment_gateways', 'my_custom_gateway_labels', 10 );

    Just change the “CUSTOM ADMIN LABEL” and “CUSTOM FRONTEND LABEL” to be whatever you like.

    Thanks!

    Thread Starter digital-workshop

    (@digital-workshop)

    No, i dont want to translate the label, i want to translate the custom text.

    Here is a image:
    https://picload.org/view/rwawwoar/schnappschuss_081017_120242_pm.jpg.html

    Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    Hmmm… I see. I’m not sure exactly how WPML would handle that. I have a contact there that I’ll reach out to, but if you could also submit a support ticket with them and let me know what you hear that would be great. I’m interested in solving this for you, but I believe it will rely primarily on WPML and not as much on us.

    Let me know what you hear. Thanks!

    Hello, Lauren from WPML here 🙂

    I would first check the text admin. I think that should make it translatable via the string translation table. To do this, go to WPML > String Translation and scroll down to the bottom of the page and click on the link “Translate texts in admin screens »”. Then, scroll through that page and see if you find the the string. If so, tick the checkbox and click Apply to add it to the String Translation table. Now you can go back to WPML > String Translation and you should see the string added there.

    Also, I would go to WPML -> Translation Management -> Multilingual Content Setup and in Custom Fields, check to see if the custom text field is set to translate. Oh and also, make sure you have enabled String Translation (WPML > Theme and plugin localization and make sure that either “Translate the theme and plugins using WPML’s String Translation only (don’t load .mo files)” or “Translate the theme and plugins using WPML’s String Translation and load .mo files as backup is selected.)

    If you need further assistance, please feel free to submit a ticket on our forum and a we can troubleshoot further if needed. https://wpml.org/forums/forum/english-support/

    Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    Woot! Thanks @lujeffcoat

    @digital-workshop — let us know how it goes.

    Thread Starter digital-workshop

    (@digital-workshop)

    @lujeffcoat &
    @webdevmattcrom

    Thank you for your help!

    With the guid from Lauren it works like a charm!

    Greetings from Vienna, Austria

    Plugin Contributor Matt Cromwell

    (@webdevmattcrom)

    Glad to hear @digital-workshop thanks for the confirmation.

    If you’re enjoying Give and appreciate our support (and Lauren’s!), we’d love a kind review from you here:
    https://ww.wp.xz.cn/support/plugin/give/reviews/

    Thanks!

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

The topic ‘Translate Payment Gateway’ is closed to new replies.