Proxylang website translation
v1.0.0Translate a website into other languages from one script tag.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
proxylang_start Start a Proxylang trial
Set up Proxylang on a website with no signup: returns the script tag, install steps for the site's platform, an agent_token for the other tools, and claim_url (sent once; save it). If the user named a language, use it; otherwise pick the one their customers most likely speak and say why. The free trial shows the first language; list other recommended languages after it.
| Parameter | Type | Description |
|---|---|---|
domain * | string | The website hostname, e.g. "example.com". |
languages * | array | Language codes, most important first, e.g. ["ja", "ko"]. |
source_lang | string | Optional. The site's own language; read from the page when left out. |
proxylang_check Check the install
Is the Proxylang tag on the live site, and have words been translated? If words_translated is 0, a real browser visit to preview_url is needed first.
| Parameter | Type | Description |
|---|---|---|
agent_token * | string | The agent_token from proxylang_start. |
proxylang_next Message for the user
Returns message_for_user: the message to end setup with (the site works, the link to keep it, and only the Proxylang features that fit this site). Show it as it is, in the user's language, with <claim_url> replaced by the saved claim_url.
| Parameter | Type | Description |
|---|---|---|
agent_token * | string | The agent_token from proxylang_start. |
proxylang_status Trial status
Free words left, trial expiry, and whether the user claimed or paid.
| Parameter | Type | Description |
|---|---|---|
agent_token * | string | The agent_token from proxylang_start. |
proxylang_change_site Change or add the trial's site
Use when the trial was started for the wrong website (action "move": the old site stops), or the tag must also work on a test or staging site (action "add": both work). Same agent_token, script tag, claim_url and free words; all sites share one limit. Not needed for localhost: use localhost_script_tag.
| Parameter | Type | Description |
|---|---|---|
agent_token * | string | The agent_token from proxylang_start. |
domain * | string | The other website hostname, e.g. "test.example.com". |
action | string | "move" (default): replace the site. "add": keep the site and also allow this test site (up to 3). |
proxylang_style Match the language menu to the site
Restyle the language menu so it looks like part of the site. Read the site's brand color, background, text color, button roundness and dark mode first, then send only the fields to change in `style`. Colors: #hex, rgb(), hsl() or a CSS color name; each has a Light and a Dark version. Full field list: https://proxylang.dev/agents.md step 7.
| Parameter | Type | Description |
|---|---|---|
agent_token * | string | The agent_token from proxylang_start. |
style * | object | Fields to change, e.g. {"accent": "#0a7cff", "triggerBgLight": "#ffffff", "triggerTextLight": "#111827", "borderRadius": "pill"}. Fields: triggerBg/triggerText/triggerHover/dropdownBg/dropdownText/bg/… |