• veronikasarah

    (@veronikasarah)


    The translation of placeholders of text, email and tel does not work properly. Only the translation of textarea-placeholders works properly for me. Also I don’t see how I can translate the Failure and Success Messages of the Contact Form 7.

    I am grateful for any tips!

Viewing 3 replies - 1 through 3 (of 3 total)
  • omahoung

    (@omahoung)

    Hello,

    I just had this problem and I actually still don’t know how to translate contact form 7, but I have found another way.

    First I have created 2 forms (1 per language). Then in the child theme functions.php I have this code:

    add_shortcode('form-lang', 'get_curr_form_lang');
    function get_curr_form_lang() {
    	$lang = transposh_utils::get_language_from_url($_SERVER["REQUEST_URI"], get_option("home") );
    	if ($lang == 'en') { // English form
    		echo do_shortcode('[contact-form-7 id="4157" title="Contact Page Form EN"]');
    	} else { // Default site language form
    		echo do_shortcode('[contact-form-7 id="1886" title="Contact Page Form"]');
    	}
    }

    Then inside the page I need this form I simply add this shortcode:

    [form-lang]

    This is working for me. It is OK if you have few forms, but if you have a lot it is maybe better to find something else.

    Thread Starter veronikasarah

    (@veronikasarah)

    Hello,

    oh nice thank you! That worked for me too!

    Plugin Author oferwald

    (@oferwald)

    Hi @omahoung

    Nice solution, although I think you could have simply used your shortcodes inside the current transposh per language shortcodes.

    Also – I use contact form 7 on transposh.org, never had any real issues translating it. so I don’t know what the problem might be…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translate Contact Form 7’ is closed to new replies.