Show / Hide content in a body of Gmail email


Our organization is completely on Gmail (Google Apps), and we are trying to figure out a way to show/hide content in the body of the email and have the recipient decide whether to show the content or collapse it to hide it.

The reason why we need to do this is because we send out generic emails in various languages, so we want the recipient to simply click on their language and have the email show the text in that language.

Things we want to avoid:

  1. Sending multiple emails out in different language (and have to manage email recipients languages and multiple emails).
  2. Display the content for all the languages one after another in the body of the email and have the user scroll down to their language.

One way I thought of doing this is by using Javascript to show/hide a div in the email that would hold the content for each language. For example, I would have an "English" hyperlink, a "Spanish" hyperlink, a "Chinese" hyperlink, etc and on click, the JS would show the div associated to the language that was clicked.

However, I was not able to get Javascript to run in Gmail when I sent a HTML email from an email client (Thunderbird).

The solution I'm looking for should ideally only require Gmail as some of the users do not have access to browse any other site outside of Gmail from their Chrome browser.

Options that don't work:

  • JavaScript doesn't work in Gmail
  • Pseudo-selectors aren't supported, so you can't do anything like :active td { height:100px }
  • display:none and visibility:invisible aren't supported

Ideas that might work

  • Point the image to your server, and get the HTTP headers. With a combination of HTTP_ACCEPT_LANGUAGE and the IP address, you should be able to serve up the appropriate image.
  • In Gmail labs, there is an option to add apps by XML. You could write an app that lets you do more advanced stuff, and tell your users to install that.

Personally, I wouldn't worry about just displaying the content one after the other. Put an index of the languages at the top of the email, with anchor links to the relevant language.