• Hi,

    I’m making a multilanguage website. I have made three different contact forms, each is in different language. Only problem is the text on the submit button. The submit button picks up the “send”-text from the translation (or it seems to be so). The admin language is in Finnish. So in the submit button it says Send in Finnish and I can’t change the text for some reason. The text doesn’t change in English if I use the following:

    [submit "Send" id:submit]

    It just shows the Send in Finnish. How can I change the text in the submit button to different language? Is this a bug or am I doing something wrong?

    Thanks for the help.

    – Tuomas

Viewing 1 replies (of 1 total)
  • Thread Starter maisteriharju

    (@maisteriharju)

    I had no time to wait so I hardcoded some changes to submit.php.

    If someone else is having the same problem I explain what I did. First of all here is why I did it: I needed to have three different submit buttons for my website since the website has three different languages. So there should be “Send-button” in three languages. Of course each button is in it’s own contact form.

    Here’s how I managed to change those texts.

    Open submit.php from wp-content/plugins/contact-form-7/modules and just change the following:

    $value = $values[0];
    if ( empty( $value ) )
    $value = __( 'Send', 'wpcf7' );

    To this:

    $value = $values[0];
    if (is_page('first contact page id here'))
    $value = __( 'first submit text here' );
    elseif ( is_page('second contact page id here'))
    $value = __( 'second submit text here' );
    else
    $value = __( 'third submit text here' );

    I’m no php coder, so it may not be beautifully written or even absolutely correct (honestly I don’t know, I just tried stuff until it worked) but it seems to work. This isn’t very good solution and I don’t recommend it because when you update the plugin, this code propably vanishes and you need to write it again. It’s based on basic conditional tags of WordPress.

    – Tuomas

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] I can’t change the text on the submit button.’ is closed to new replies.