Let me start off by saying this module saved me the work of implementing this myself so thanks for that.

But i'm using multiple languages on our websites(using i18n). Therefore it would seem pretty useful to me for anonymous users to see the tweetbutton in the language they're viewing the website in.

A simple modification to the 'tweetbutton_get_attributes' function accomplishes this.
I just added the following code to the function and modified the $attributes parameter:

global $language
$attributes['data-lang'] = $language->language;

Comments

y_h’s picture

Make that

global $language;
$attributes['data-lang'] = $language->language;

I was a little too fast on adding the code :)