In this brief tutorial I will show you how to setup and configure Mailchimp for a multilingual Drupal 7 website and succeed in translating the Signup form field labels.
Sometimes, I find that working with Drupal requires a strict recipe-like approach in order to reach the desired outcome - and perhaps avoid going insane. In other words, the order in which you perform each step is important.
When you set out to make banana bread, it is not sufficient to know that you need 2 cups of flour, 2 eggs, 1/4 cup of butter, 1 cup of milk and, of course, 2 blackened bananas. If you mix the ingredients in the current order, your likely to run into trouble. Knowing a thing or two about basic cooking will help you come up with the appropriate workflow that will have your friends and colleagues raving about your banana bread.
The following recipe is the result of many hours of issue queue scavenging and community help, mixed in with trial and errors - required skills for any Drupal chef. The workflow that works for me may or may not be completely appropriate for your use case. But it should definitely give you a head start.
I'm not going to delve into how to install Mailchimp - no recipe book gives you directions on how or where to buy flour & eggs, right? Everything you need to know for this procedure is available on Mailchimp's project page or in the Community Docs. I'll give but one advice: install the appropriate Mailchimp library first i.e. before you enable the Mailchimp module.
- Install the latest dev dated 2015-Sep-16 (7.x-3.6+2-dev) or better. As far as I know, the following workflow will not work if you use older versions of the 7.x-3.x branch.
- Drupal's default language (
admin/config/regional/language) must match with your Mailchimp account's Signup form Field labels.
- if Drupal's default language is English then make sure that Mailchimp's Signup form labels are also in English i.e. Email Address, First Name and Last Name.
- if Drupal's default language is French then make sure that Mailchimp's Signup form labels are also in French i.e. Courriel, Prénom and Nom.
- make sure the Mailchimp Lists module is enabled (I'm assuming your MailChimp API Key is saved at
- go to
admin/config/services/mailchimp/listsand click on Refresh lists from MailChimp.
- Flush all caches.
- go to
admin/config/services/mailchimp/signupto edit your signup form; you should now see your field labels under Merge Field Display as they appear in your Mailchimp account's Signup form Field labels.
- Save the form.
- finally, go to
admin/config/regional/translate/translateand search for the strings you need to translate.
- if Drupal's default language is English, search for e.g. Email Address and translate to the other language(s).
- if Drupal's default language is French, search for e.g. Courriel and translate to the other language(s).
That should do it, for Mailchimp I mean.
As for the banana bread, well here's the full recipe. Sorry, there's no module for that.
Mix until homogenous (remember, order matters):
- 1/4 cup of sugar
- 1/4 cup of melted butter
- 2 eggs
- 2 blackened bananas (mashed of course)
Set oven temperature to 350F (180C). In a measuring cup, add:
- 2 cups of flour
- 2 teaspoons of Magic Baking Powder
- 1 teaspoon of Baking soda
- 1/2 teaspoon of salt
Mix gently until homogenous in 3 to 4 steps along with 1 cup of milk.
- add 1/4 cup of chocolate chips (more if you've been waiting for Drupal 8 for more than a year).
- pour mixture in a lightly buttered pyrex dish (8"x8"x2"). Add chopped nuts on top of the mixture if you want.
- bake for about 60 minutes.