Skip to content

Instantly share code, notes, and snippets.

@dangerouse
Last active April 12, 2017 21:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dangerouse/3c9570a3f1f0332444215df0a5929596 to your computer and use it in GitHub Desktop.
Save dangerouse/3c9570a3f1f0332444215df0a5929596 to your computer and use it in GitHub Desktop.
CloudSponge Widget Reference - Override Locale Data
<!DOCTYPE html>
<html>
<head>
<!--
Include the script anywhere on your page, usually in the head
(don't forget to replace `localhost-only` with your CloudSponge key)
-->
<script src="//api.cloudsponge.com/widget/localhost-only.js"></script>
<script>
// extra widget options go here:
cloudsponge.init({
// localeData is an object that specifies any custom text that you want to override
localeData: {
// change the text on the CTA
GET_CONTACTS: "Invite ${0} people"
}
// Alternatively, you can specify a JSON file to load with the data,
// see the data structure here: https://gist.github.com/dangerouse/09ff6c1d6c681475a741ed37c2eda016
// localeData: 'url/to/locale/file.json'
});
</script>
</head>
<body>
<a class="cloudsponge-launch">Add from Address Book</a>
<textarea class="cloudsponge-contacts"></textarea>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment