• Hi,

    I have embedded a form in the template with function;

    <?php echo do_shortcode( ‘[contact-form 1 "Contact form 1"]‘ ); ?>

    Now I would like to make this form multi-language. According to qtranslate I need to add their tags <!–:es–><!–:–> or [:es]. I have tried adding it to the php above using 2 different forms and also adding the tags to the actual form shortcode…but neither worked.

    Any idea what I’m doing wrong or if this is possible?

    Has anybody done this before if so how ?

    I would really appreciate the help.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php if(qtrans_getLanguage() == "en") : ?>
    <?php echo do_shortcode( '[contact-form 1 "Contact form 1"]' ) ?>
    <?php endif ?>
    <?php if(qtrans_getLanguage() == "fr") : ?>
    <?php echo do_shortcode( '[contact-form 2 "Contact form 2"]' ) ?>
    <?php endif ?>
    <?php if(qtrans_getLanguage() == "nl") : ?>
    <?php echo do_shortcode( '[contact-form 3 "Contact form 3"]' ) ?>
    <?php endif ?>

    That is how I solved it for 3 different languages.

    Hello,
    I have version 2.4.6 of Contact Form 7 installed and changed line 84 in settings.php. It was
    return (string) $wpcf7_request_uri;
    and now is

    $lang = "&lang=" . qtrans_getLanguage();
    return ((string) $wpcf7_request_uri) . $lang;

    It works fine for me and maybe this can be a hint to somebody else…
    cheers

    Thanks guys!
    It works for me.
    Small comment:
    I used the languagecode from Lime-IMC one on each contactform and not the whole code in the textbox of all the forms, so:

    <?php if(qtrans_getLanguage() == “en”) : ?>
    <?php echo do_shortcode( ‘[contact-form 1 "Contact form 1"]‘ ) ?>
    <?php endif ?>

    in the English version, etc..
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Contact Form 7] ContactForm 7 & Qtranslate’ is closed to new replies.