Drupal Sharing Customization
Translation & Localization
By default, AddToAny automatically translates the menu based on the locale of each user's browser.
You can set the default locale by choosing a language in the button generator, or you can customize the language yourself by following the example below.
var a2a_config = a2a_config || {};
// de
// German / Deutsch
a2a_config.localize = {
Share: "Teilen",
Save: "Sichern",
Subscribe: "Abonnieren",
Email: "E-Mail",
Bookmark: "Lesezeichen",
ShowAll: "Alle anzeigen",
ShowLess: "Weniger anzeigen",
FindServices: "Finde Dienste",
FindAnyServiceToAddTo: "Finde deinen Bookmarkdienst",
PoweredBy: "Unterstützt von",
ShareViaEmail: "Teile via E-Mail",
SubscribeViaEmail: "Abonniere via E-Mail",
BookmarkInYourBrowser: "Lesezeichen im Browser setzen",
BookmarkInstructions: "Benutze die Tasten Ctrl+D oder Cmd+D um die Seite zu speichern",
AddToYourFavorites: "Als Favorit setzen",
SendFromWebOrProgram: "Sende die Seite von der Website oder einem Programm aus",
EmailProgram: "E-Mail-Programm",
More: "Mehr…",
ThanksForSharing: "Danke für das Teilen!",
ThanksForFollowing: "Danke fürs Folgen!",
};
In Drupal, add the following JavaScript code to your "Additional JavaScript" box in Configuration > Web services > AddToAny > Additional Options.
In WordPress, add the following JavaScript code to your "Additional JavaScript" box in Settings > AddToAny.
// de // German / Deutsch a2a_config.localize = { Share: "Teilen", Save: "Sichern", Subscribe: "Abonnieren", Email: "E-Mail", Bookmark: "Lesezeichen", ShowAll: "Alle anzeigen", ShowLess: "Weniger anzeigen", FindServices: "Finde Dienste", FindAnyServiceToAddTo: "Finde deinen Bookmarkdienst", PoweredBy: "Unterstützt von", ShareViaEmail: "Teile via E-Mail", SubscribeViaEmail: "Abonniere via E-Mail", BookmarkInYourBrowser: "Lesezeichen im Browser setzen", BookmarkInstructions: "Benutze die Tasten Ctrl+D oder Cmd+D um die Seite zu speichern", AddToYourFavorites: "Als Favorit setzen", SendFromWebOrProgram: "Sende die Seite von der Website oder einem Programm aus", EmailProgram: "E-Mail-Programm", More: "Mehr…", ThanksForSharing: "Danke für das Teilen!", ThanksForFollowing: "Danke fürs Folgen!", };
Force language
If you're providing your own translation, you can turn off AddToAny's auto-localization and always force your custom translation.
var a2a_config = a2a_config || {};
a2a_config.locale = "custom";
In Drupal, add the following JavaScript code to your "Additional JavaScript" box in Configuration > Web services > AddToAny > Additional Options.
In WordPress, add the following JavaScript code to your "Additional JavaScript" box in Settings > AddToAny.
a2a_config.locale = "custom";You can force a certain pre-translated locale by specifying a supported language code (such as
fr
or fr-CA
).
var a2a_config = a2a_config || {};
a2a_config.locale = "fr-CA";
In Drupal, add the following JavaScript code to your "Additional JavaScript" box in Configuration > Web services > AddToAny > Additional Options.
In WordPress, add the following JavaScript code to your "Additional JavaScript" box in Settings > AddToAny.
a2a_config.locale = "fr-CA";