> For the complete documentation index, see [llms.txt](https://docs.zigpoll.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zigpoll.com/integrations/weglot.md).

# Weglot

Translate your Zigpoll surveys with Weglot

Integrate Weglot with Zigpoll to automatically translate your surveys into whatever language your customer prefers. This uses the **Custom Code** setting, which requires a **Standard** plan or better.

#### Step #1: Add Weglot to Your Survey's Custom Code

1. Go to **Zigpoll → Surveys → Select your survey → Settings → Design**.
2. Scroll to the bottom where it says **Custom Code**.
3. Enable this setting and paste in the following code snippet:

```html
<script src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
// In your iframe
Weglot.initialize({
    api_key: "wg_xxxx", // Replace with your Weglot API key
    hide_switcher: true // You already have a switcher in parent window
});
</script>
```

#### Step #2: Update Your Existing Weglot Code

Update your existing Weglot code integration on your website to include the Zigpoll iframe IDs:

```html
<script src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
// In your parent window
Weglot.initialize({
    api_key: "wg_xxxx", // Replace with your Weglot API key
    translate_iframes: ["#zigpoll-hide-frame", "#zigpoll-launcher-frame", "#zigpoll-poll-iframe"]
});
</script>
```

That's it! Your Weglot integration should now be completely set up and your survey will be translated into whatever language your customer prefers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zigpoll.com/integrations/weglot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
