Hi there,
According to the AddThis website, to get the menu to show up in your own language, you need to specify a javascript var:
<script type="text/javascript">
var addthis_language = "zh";
</script>
...but there doesn't seem to be an option for setting that var in the admin settings.
I can override theme_addthis_button() and manually enter the language, but perhaps this should be a menu option? Or perhaps it should be a value taken from a Drupal site's (or the current page's) language settings, in order to be really useful for multilingual sites.
Or am I missing something somewhere in the code/settings page?
Cheers,
Stephen
Comments
Comment #1
vesapalmu commentedNo, you are right. There is currently no smart way to set the language. This feature will be added in future releases. I think it should always default to same language as current page since we want to also support multilanguage sites.
Comment #2
vesapalmu commentedI just had another look at this. Does anybody want to implement this to support both multi-language sites, official addthis.com translations and custom translations? This should be quite simple thing to implement, but I just don't have the time before June.
Comment #3
kerberos commentedHello.
We would be willing to lend a hand with this. Are you still willing to add this feature if we work on a patch (or would it have to wait until after the API change and D7 version)? If yes, what module version do you want us to develop this feature against? 6.x-2.x-dev is older than 6.x-2.8. Thanks.
-Daniel
Comment #4
domthinks commentedIt would be great to also include an option for language specific "Button image" on the settings page or provide a way to retrieve different images based on the user's selected language. For example pointing the "Button image" http://s7.addthis.com/static/btn/lg-share-es.gif for the Spanish language.
Comment #5
nonsieAttached is a patch that:
1. adds a checkbox to switch addThis language based on current language if enabled. Defaults to en as it is atm
2. provides a way to map different button images per language
It does not provide any mapping for secure connection images but it's easy to add based on the modifications for button image mapping.
The patch is against 6.x-2.8 as I was not sure what's going on with the dev version.
Comment #6
kerberos commentedWe separately created a slightly different type of patch. This one allows you to add any custom javascript options via the AddThis API. This allows to change the language, for example, but also allows to pick different links for the widget or make any other changes via the options API.
A second change is to choose where the AddThis JS is added (header or footer) via an admin option. This patch is more general than the one in #5 but does not have the automatic language change based on selected language.
-Daniel
Comment #7
vesapalmu commentedWe need to add language support also to 2.x version, but it should be a separate patch. For now it also seems like a good idea to move JS to footer even by default. Both of these will definitely stay on our todo list.
Comment #8
les limThe 6.x-3.x branch passes to AddThis whichever language code that the page was rendered with. This should still be looked at for the 2.x branch for those who aren't in a position to upgrade.
Comment #9
Jean Gionet commentedany updates on this feature for drupal 7? thxs
Comment #10
matglas86 commented@Les Lim this was marked for the 6.x-2.x-dev version. Is it fixed there? I'll create a new issue for language support in the 7.x-4.x-dev. We don't have it in there yet but we do need it.
The other issue is here. #1330284: Multi language support
Comment #11
les limI don't think anything was done to language support in 2.x. I never actually touched the 2.x version, personally - I didn't want to set a precedent for providing support for it, since there isn't any feature in 2.x that isn't handled better in 3.x.