Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have site wich has multiple languages and I need AddToAny custom link text to be translated. Any ways to do this?
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#5 | addtoany-1591820-5.patch | 438 bytes | sk33lz |
Comments
Comment #1
dshields CreditAttribution: dshields commented...?
Anyone else need this module in a multilingual set-up?
Comment #2
gejo CreditAttribution: gejo commentedI've tried to translate it following this instructions:
https://www.addtoany.com/buttons/customize/drupal/translation_localization
... with no luck.
Comment #3
baso CreditAttribution: baso commentedI encountered the same problem. I solved it by adding variable support to the Link text field as follows:
1. To addtoany module directory add file 'addtoany.variable.inc' with following contents:
2. Make this file known to the module by putting the following line in file 'addtoany.info':
3. Clear cache.
4. Go to 'Home » Administration » Configuration » Regional and language » Multilingual settings » Variables' and in section 'Other' check option 'AddToAny link text'.
5. Go to 'Home » Administration » Configuration » System » AddToAny', and for each language that you want to have a translation for select this language in top section of screen and enter the desired translation value in field 'Link text' of section 'Universal Button'.
Comment #4
csc4 CreditAttribution: csc4 commentedThanks for #3 - works brilliantly. I'm still having problems though with persuading 'Share / Save' on the button to translate for those on a multi lingual whose browser locales aren't set to the language - I'd like to be able to set the language when they choose to see the page in a different language.
https://www.addtoany.com/buttons/customize/translation_localization suggests
can we use that or is it just not possible?
Comment #5
sk33lz CreditAttribution: sk33lz at Zivtech commentedI've rolled a patch against 7.x-4.x-dev for #3 as it works well for i18n translations.
Comment #6
micropat CreditAttribution: micropat commentedCommitted to dev and tested with the i18n and variable modules.
Comment #9
micropat CreditAttribution: micropat commentedFixed in 7.x-4.9.