# Weglot

Integrate Weglot with Zigpoll to automatically translate your surveys into whatever language your customer prefers. This requires a **Pro plan** or better.

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

1. Go to **Zigpoll → Surveys → Select your survey → Click the Design tab**.
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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
