Get an API key
You need a JigsawStack public key to authenticate the widget. See Getting your API key for step-by-step instructions on creating one with translation capabilities enabled.
Install the widget
Choose the installation method that fits your project.Or load directly from a CDN — place this tag just before the closing
</body> tag in your HTML:index.html
Initialize the widget
Call Script tag (HTML):Add an initialization script immediately after the CDN script tag:Replace
TranslationWidget with your public key and configuration options.ESM (npm/yarn/pnpm):app.ts
index.html
"YOUR_PUBLIC_KEY_HERE" with your actual public key from the JigsawStack dashboard.Done
The widget is now active. Visit your site and you will see the translation UI appear at the configured position (default:
top-right). Users can select a language from the dropdown, and the widget will translate the page content, cache the result, and restore it on future visits.The widget automatically handles:- Language persistence across page reloads via localStorage
- URL-based language loading via
?lang=query parameter - DOM updates and cache management