• Resolved jo-li

    (@jo-li)


    Hi,

    I’m using the lite version of the plugin, and I’m wondering how to get the form translated (using it via the Widget)? I can see there are the .po files in the plugin but for some reason it does not translate the labels visible to end-user? I am using polylang, but it is mostly compatbile with any WPML supported plug in.

    Kindly help please,
    J

    https://www.ads-software.com/plugins/mailchimp-for-wp/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi J,

    When using WPML then you can translate the form using the WPML String Translator, I’m not sure how that would work with Polylang though.

    An easier option might be to purchase the Pro version since it allows you to create multiple forms, one for each of your site languages. You can then choose which form to show for which language.

    I’m sorry I can’t be of more help right now – looking into a better way to support Polylang out of the box is definitely on our list!

    hello,

    I installed the version Lite of your plugin. I have two languages in the website, spanish and english. I need to put the suscribe for two forms, one for each language. Can I have this with introducing the code of this next link?

    https://mc4wp.com/kb/set-lists-based-site-language/

    (If I insert this code the website will be white)

    or I must buy the version pro. (I have the wpml plugin)

    thank you so much.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi @noe_sp,

    That filter will work for both the free version (this one) and the paid version so there should be no issue there. My first guess is that you accidentally copied the opening <php tag into your theme its functions.php file.

    Please start copying on line #3 until the end of the snippet as the opening tags are already in your functions.php file, in most cases. That will more than likely fix the issue. ??

    Hope that helps. If not, let me know!

    PS. This is the relevant part:

    /**
     * Tell MailChimp for WordPress to subscribe to a certain list based on the WPML language that is being viewed.
     *
     * Make sure to change the list ID's to the actual ID's of your MailChimp lists
     *
     * @param array $lists
     * @return array $lists
     */
    function myprefix_filter_mc4wp_lists( $lists ) {
    
    	$list_id_spanish_list = '123abcdef456';
    	$list_id_english_list = '456defabc123';
    
    	if( defined( 'ICL_LANGUAGE_CODE') ) {
    
    		switch( ICL_LANGUAGE_CODE ) {
    
    			// spanish
    			case 'es':
    				$lists = array( $list_id_spanish_list );
    			break;
    
    			// english
    			case 'en':
    				$lists = array( $list_id_english_list );
    			break;
    		}
    
    	}
    
    	return $lists;
    }
    
    add_filter( 'mc4wp_lists', 'myprefix_filter_mc4wp_lists' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation of Form’ is closed to new replies.