WPML String Translation not working

pending (10 posts) (2 voices)

  1. lemonberry
    Member

    Hiya,

    I'm using the contact form shortcodes on my contact form footer, but even though I have used the String Translation of WPML, AND the title is being translated fine, the Name, Email, Message string isn't being translated. Can you help?

    http://www.valshebnik.com

    Many thanks,
    Lisa

    Posted 4 years ago #
  2. Elliott
    Support

    Hello lemonberry,

    Try using the contact form shortcode in a text widget, http://mysitemyway.com/docs/index.php/Contact_Forms. You can set the labels to whatever you need.

    Posted 4 years ago #
  3. lemonberry
    Member

    Hi,

    I am using shortcodes in the widget, and of course there isn't a separate widget for the Dutch version, it does say:
    "This widget is converted to multilingual"
    but it isn't translated.

    If I change to Dutch (at the top of the admin page) and change the words manually, it changes both the English and Dutch.

    Thanks
    Lisa

    Posted 4 years ago #
  4. Elliott
    Support

    Try setting two of them with our WPML shortcode, http://mysitemyway.com/docs/index.php/WPML#WPML_shortcode.

    Posted 4 years ago #
  5. lemonberry
    Member

    Tried that, unfortunately it looks like this. (It is translated though!)

    The code in the footer widget text:

    [wpml_translate lang=en][contactform email = "grhays@valshebnik.com" success = "Thanks for your message!"
    subject = "From: Valshebnik Consulting website"]
    [name label="Name"]
    [email label="Email"]
    [textarea label="Message"]
    [/contactform][/wpml_translate]

    [wpml_translate lang=nl][contactform email = "grhays@valshebnik.com" success = "Bedankt voor uw bericht!" subject = "From: Valshebnik Consulting website"]
    [name label="Naam"]
    [email label="Email"]
    [textarea label="Bericht"]
    [/contactform][/wpml_translate]

    Attachments

    1. translation_contact_form.jpg (93.7 KB, 0 downloads) 4 years old
    Posted 4 years ago #
  6. Elliott
    Support

    Are you sure you did the instructions in the link? Make sure the do_shortcode is used on this line,

    return do_shortcode($content);

    Posted 4 years ago #
  7. lemonberry
    Member

    This is from my function.php:

    //************************************* Custom WPML Translation Shortcode
    function webtreats_lang_test( $atts, $content = null ) {
    extract(shortcode_atts(array(
    'lang' => '',
    ), $atts));

    $lang_active = ICL_LANGUAGE_CODE;

    if($lang == $lang_active){
    return do_shortcode($content);
    }

    }
    add_shortcode('wpml_translate', 'webtreats_lang_test');
    ?>

    Posted 4 years ago #
  8. Elliott
    Support

    The instructions were for the framework.php file, not the functions.php file. Try completely deleting the theme and then download / upload a fresh copy and try again.

    Posted 4 years ago #
  9. lemonberry
    Member

    Sorry, I meant framework.php and NOT functions.php

    Posted 4 years ago #
  10. Elliott
    Support

    That should be working. Perhaps there is a problem with how you did the edit. Try completely deleting the theme and upload a fresh copy and try the edit again.

    If your still having problems then send us a private message by clicking on the "PM this user" link beneath our usernames and include a Wordpress login + link back to this topic.

    Posted 4 years ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme