Script snippet quick start
The snippet is a single <script> tag. It needs no server changes. The loader translates the page in the visitor's browser and falls back to your original text if anything fails.
The tag#
<script async src="https://cdn.example/loader/v1/loader.js"
data-site-key="rl_site_live_abcdefghijklmnopqrstuv"
data-public-key="EXAMPLEPUBLICKEYEXAMPLEPUBLICKEYEXAMPLEPUBL"></script>
Both values come from your dashboard. The site key and the public key are public; they are safe in HTML. Never put a secret key (rl_sec_...) in a page. The full attribute list is in The loader.
Where to paste it#
Vendor facts below were checked against the vendors' own help pages on 2026-10-29 (docs/install/VENDOR_VERIFICATION.md in the repository). That proves a vendor documents the mechanism, not that our loader has been run on that platform: nothing here was tested on a live vendor site. Plan names and exact limits should be re-read on the vendor page before you rely on them.
| Platform | Place | What the vendor says, and what is still verify |
|---|---|---|
| Plain HTML | In <head> of every page | Add the switcher markup where you want it |
| Wix | Settings > Custom Code (Development & integrations) > Add Custom Code, all pages, Head, load once per visit or on each page | The site must be published with a connected domain; changing the primary domain deletes existing snippets. The help page names no plan (third-party guides say a paid plan: verify). Since December 2025 Wix blocks some older snippets under new frontend security measures until their providers update them, so test the live site. Google Tag Manager and analytics do not work through Wix custom code (Wix says to use its marketing integrations), so GTM is not a fallback on Wix. Wix does not support problems with third-party snippets. Whether data-* attributes survive, whether it runs in the editor preview, and whether you can change the CSP header: verify. Source: Wix help |
| Squarespace | Code Injection panel (from the project picker, or Pages > Website Tools > Code Injection), Header | Core, Plus, Advanced and some legacy plans. The header goes into the head of every page. Checkout does not support custom code; order confirmation and order status pages have their own injection fields. A trial site's lock screen cannot take code. On 7.0, Ajax loading can stop injected CSS from loading properly (scripts are not mentioned). Squarespace support will not help with custom code. Use site-wide header injection: page-level injection does not appear on index landing pages. CSP control: verify. Source: Squarespace help |
| Webflow | Site settings > Custom code > Head | verify: Webflow's help pages could not be fetched, so everything here is from search summaries (a paid Workspace or an active Site plan; limits per section; published site only). Re-read the vendor page |
| Framer | Project Settings > Custom Code > Add Script, choose the position (start or end of head or body), all pages or selected pages, run once or on every visit | Not loaded in the preview: publish and test live. No plan is named on the help pages (verify); whether data-* attributes are kept is verify. Source: Framer help |
| Ghost | Settings > Advanced > Code Injection, Site Header | Applies to every page; plan restriction, data-* handling and CSP: verify. Source: Ghost help |
| HubSpot CMS | Settings > Content > Pages > domain > Site Header HTML | Available on all plans, with options varying by subscription and content type. Whether some page types (for example knowledge-base articles) are skipped is verify. Source: HubSpot knowledge base |
| BigCommerce | Script Manager, Stencil themes only (Blueprint themes do not render it; Catalyst is limited) | Use the storefront scope. Checkout and payment pages need an integrity hash on every script, which a changing loader file would break. Account pages: test. Scripts have a category that feeds the cookie banner, so a shopper who opts out may not load it. data-* handling: verify |
| Magento / Adobe Commerce (PaaS) | Content > Design > Configuration > store view > Other Settings > HTML Head > Scripts and Style Sheets | Payment pages from 2.4.7 need the script whitelisted in a module csp_whitelist.xml (not an Admin setting). Adobe Commerce as a Cloud Service is a different, headless setup: verify, these steps may not apply |
| Drupal | A library in THEME.libraries.yml with type: external and attributes: (for example async: true, data-*), attached through THEME.info.yml | Self-hosted. Core has no complete CSP |
| Joomla | joomla.asset.json with attributes for data-* and a full-URL uri | Head placement and async: verify |
| Weebly, Duda | verify: no official instructions could be fetched; do not rely on this route until it is confirmed | |
| Single-page apps | Once in the HTML shell | The loader watches DOM changes. See the repository guide integrations/snippet/guides/headless-spa.md |
Frameworks (when you do not use the build-time SDKs)#
- Next.js:
next/scriptforwards extra attributes such asdata-*andnonceto the script element (the default strategy isafterInteractive;asyncis not discussed, so check the rendered tag). - Nuxt:
useHeadorapp.headacceptssrc,asyncand attributes (data-*is inferred, verify). - Astro: a script with attributes other than
srcis left alone, andis:inlinerenders it as written. - SvelteKit and Gatsby: a custom head tag works through
app.htmlorgatsby-ssr(implied, not stated; verify).
Google Tag Manager#
A Custom HTML tag can hold a script, but GTM adds a loading step before our loader, so a flash of source-language text is likely and no timing is promised. Whether data-* attributes are kept is verify. It does not work through Wix custom code (see above).
Test it#
- Publish the site and open it in a private window.
- Pick a language in the switcher and reload. The choice is remembered in the browser.
- Open the browser developer tools, block the bundle host, reload: the page must show your original language, not an error.
Optional hardening#
- SRI. Pin the loader with
integrityonly on an immutable versioned loader URL (/loader/1.x.y/loader.js). Never on the mutable/loader/v1/loader.js: a pinned hash would break every time the loader updates, and the page would stay untranslated. - CSP. If your site sends a Content-Security-Policy, allow the loader origin in
script-srcand the bundle origins inconnect-src. See CSP and headers. Wix, Squarespace and Webflow may not let you change that header; none of their help pages says either way (verify).
Read SEO and the script snippet before promising anyone search traffic in other languages.