FOR DEVELOPERS

Build the next connection.

A practical guide to the website runtime, real AI language translation and the sharing experience you control. Start with working Builder code, then add the modules your project needs.

Choose your integration

Your project Start here Measurement
WordPress Install the official plugin Optional local button-click reports
Website or another CMS Generate your base installation with the Website Builder Review the generated runtime and your analytics configuration
Research or data partnership Discuss the signal platform A separately scoped agreement

The website modules below extend the website integration. WordPress uses its bundled runtime and settings; these scripts are not a replacement for that installation.

Website quick start

  1. Choose your destinations, design and placement in the Builder.
  2. Copy its generated HTML, configuration and runtime script into your template. Keep the configuration before the script that consumes it.
  3. Include the base runtime once. Check for an existing installation before adding another one.
  4. Add optional modules only when you need them, then clear page and CDN caches.

Use the generated base code as the installation source. The snippets below are additions or diagnostic examples, not a complete replacement toolbar.

Real AI language translation

WeShareAI uses real AI through OpenAI to generate translations for the website sharing interface. Opening an AI destination and selecting country presets are separate capabilities.

Add this pair after the Builder installation when it is not already included. Both scripts use defer; keep the loader before the patch.

<!-- Optional language modules: include each once -->
<script src="https://weshare-ai-language.vercel.app/weshare-language-ai.min.js" defer></script>
<script src="https://weshareapp.io/widget/menu3x/js/weshare-language-patch-ai.js" defer></script>

The loader reads the browser language, requests translations and prepares an in-memory dictionary. The patch applies those translations to the sharing UI. English labels remain the fallback when a language is unsupported or a request fails.

Contract Value
Fixed label keys copy, email, blog, follow, search, thanks, share
Language codes in the inspected loader ja, en, it, es, el, hi, pl, zh, fr, de, ko, pt, ru, ar, nl, vi, et, th, cs, da
Translation dictionary window._weshareLangMap
Notification weshareTranslationsComplete on window
Content scope Sharing controls and default thank-you text

Articles and arbitrary publisher messages are outside this translation scope. AI-generated wording can vary; review labels important to your audience. The marketing-site language preview uses prepared examples rather than making live translation calls.

Language readiness hook

Register your listener before the language loader if your own interface depends on its notification. Read the dictionary only after checking that it exists; a notification alone does not prove every label was successfully translated.

window.addEventListener('weshareTranslationsComplete', () => {
  const labels = window._weshareLangMap;
  if (!labels || typeof labels !== 'object') return;
  // Read the available labels for your own UI here.
  // The WeShareAI Language Patch handles the sharing interface.
});

Service and hosting notes

The language backend runs separately from your website. It sends fixed label keys and a target language to an OpenAI-backed service. API credentials stay on the server; publishers should never add an OpenAI API key to page source.

A Greek endpoint request returned HTTP 200 with a translated label on 28 November 2026. This is a dated service check, not a guarantee of uninterrupted availability or every language’s quality.

For another domain or staging host, confirm that the translation service permits its origin. The inspected backend explicitly allows https://weshareapp.io, https://www.weshareapp.io and http://localhost:3000; another publisher origin needs service-side configuration before these browser requests can succeed. CORS is not an authentication or billing-abuse control.

Smart sharing by country

Country selection uses curated service presets. It is deterministic selection, separate from OpenAI translation. Where enabled in your Builder runtime, the optional module is:

<!-- Optional country-preset module; use with a compatible Builder setup -->
<script src="https://weshareapp.io/widget/menu3x/js/smart/smart-weshare-ai.js" defer></script>

A script tag alone does not create the toolbar. Retain the matching markup and base renderer from your integration. Use the audience preview to explore illustrative ordering; its controls do not detect location or train a model.

After-share experiences

A useful next step can be a thank-you, a CTA or a website video. Explore the interactive example before choosing the experience. WordPress exposes its own message and CTA settings.

For a compatible website runtime, the proposed video option is a configuration field inside the existing Builder configuration:

// Configuration fragment, not a complete installation.
// Confirm ad_url support in the runtime used by your website.
ad_url: "https://www.youtube.com/embed/lB95KLmpLR4?start=6&mute=1&autoplay=1",

This video’s playback in the marketing demo does not establish support in every Builder runtime. Review external-media loading, consent, autoplay restrictions and mobile behaviour before enabling it. Preserve a visible close control and keyboard access.

The published post-sharing publisher agreement remains available at the exact URL used by the Builder.

Events and measurement

A sharing-button click signals an action or intent. It does not confirm a completed post on another service, an AI response or a unique reader. Avoid naming a button-click metric “completed shares”.

Use the analytics options documented for your installation. WordPress local reports, publisher GA4, service analytics and the language service have different data flows. The language notification above is not a sharing-completion event. Reward callbacks and post-share lifecycle APIs are not documented here as supported runtime contracts.

Read Privacy & data when deciding which integrations to enable. Requests to hosted scripts, translation services and external media can process network data even when browser credentials are omitted.

Troubleshooting and support

Symptom First check
Buttons missing Generated markup, one base runtime, browser errors and cached HTML
English labels remain Supported browser language, translation response, permitted origin and patch loading
Duplicate toolbar or requests Theme, tag manager and plugin installing the same script twice
After-share differs from the demo Runtime-specific options and website versus WordPress configuration
No local WordPress counts Local statistics setting, REST requests and cached configuration

For help, send the affected public URL, integration type, expected result and relevant error text to [email protected]. Keep API keys and visitor data out of support messages.

Continue with Setup & support, Changelog or System Status.

Let’s make the next connection.

Find the right sharing tool or start a specific conversation with the WeShareAI team.

YOUR PRIVACY

Your choice. Your control.

We use essential storage to remember your privacy choices. Optional analytics require your permission. With your permission, Google Analytics helps us understand website usage. Advertising features remain disabled.

Privacy policy