Developers

Multi-language surveys

One survey, several languages. Add translations in the survey's Languages tab; the widget, survey links and embeds show the respondent's language.

How languages work

Every survey has a default language (the language its questions are written in; en unless you change it) and optional translations. Language codes follow BCP-47 (es, pt-BR, zh-Hans). A regional code matches its base language: a visitor with pt-BR sees the pt translation if there is no pt-BR one.

Built-in text (buttons, the required-answer hint, the default scale labels, “Powered by”, the default thank-you message and the “survey unavailable” page) ships in en, es, pt, fr, de, it, nl, ar, he, fa, ur. For any other language, English is used unless you override those strings in the Languages tab. ar, he, fa, ur are displayed right-to-left. Surveys without translations behave exactly as before.

Widget: choosing a language

The widget goes through these in order:

  1. FeedPulse.setLanguage("es")
  2. FeedPulse.identify({ userId, language: "es" }), or a language trait on the identified user
  3. The data-language attribute on the script tag
  4. The lang attribute of the page's <html> element
  5. The browser's preferred languages (navigator.languages)
  6. The survey's default language

Script tag

<script src="https://YOUR-FEEDPULSE-HOST/widget.js" data-feedpulse-key="YOUR_SURVEY_KEY" data-language="es" async></script>

Change the language at runtime

FeedPulse.setLanguage("fr");   // re-renders an open survey
FeedPulse.setLanguage(null);   // back to automatic detection

The first of the first three (a language you set explicitly) decides: if the survey has no translation for it, the default language is shown. The page language and the browser languages are only hints: they are tried in order and the first one the survey offers wins, otherwise the default language is shown. The widget never hides a survey because a language is missing.

/s/<key> and /embed/<key> use the lang query parameter first (if the survey has no translation for it, the default language is shown), then the browser's Accept-Language header, then the default language.

Examples

https://YOUR-FEEDPULSE-HOST/s/YOUR_SURVEY_KEY?lang=es
https://YOUR-FEEDPULSE-HOST/embed/YOUR_SURVEY_KEY?lang=pt-BR

The same two pages also take ?theme=light, ?theme=dark or ?theme=auto, which overrides the survey's colour scheme for that link (see Appearance). Combine them with &, for example ?lang=es&theme=dark.

Email invitations

An invitation links to the survey with the contact's language property when the contact has one (for example set through identify, an import or the API), otherwise to the default language.

Missing translations

A string without a translation falls back to the default-language text for that string only; the rest of the survey stays translated. This differs from tools that hide a language until every string is translated. The Languages tab shows how many strings are translated per language and warns (without blocking) when you publish an incomplete translation.

Responses and exports

Each response stores the language the respondent saw (metadata.surveyLanguage). Answers to choice questions are stored as the default-language option text, so results from every language add up. The response page shows the language, the Responses list can be filtered by it, and the CSV export has a language column.

API and MCP

GET /api/v1/surveys/{id} returns languageDefault and translations; PATCH accepts both (and the MCP update_survey tool does too). Translations are validated and cleaned on save: unknown keys are dropped, blank strings count as missing. Translations of a question are keyed by the question id. See the REST API docs.

PATCH /api/v1/surveys/{id}

{
  "languageDefault": "en",
  "translations": {
    "es": {
      "questions": { "<questionId>": { "text": "¿Qué probabilidad hay de que nos recomiendes?" } },
      "thankYou": "¡Gracias por tus comentarios!",
      "chrome": { "submit": "Enviar" }
    }
  }
}

Appearance: theme, position, overlay

Set these on the survey's Widget tab under Appearance, on every plan. A live preview shows the result. Defaults are the look the widget always had: light, bottom right (centred for the modal), dark overlay.

  • Colour scheme: light, dark or auto. Auto follows the visitor's device setting (prefers-color-scheme) and switches live if it changes while the survey is open. It applies to the modal, bubble and inline widget, and to survey links and embeds. Your primary colour is kept; where it would be hard to read on the dark card it is lightened, and text on primary buttons switches between white and near-black for contrast.
  • Position: for the bubble (button and panel) choose bottom right (default), bottom left or bottom centre. For the modal choose centre (default) or bottom left. Left and right are physical sides, so a right-to-left page is not mirrored. On narrow screens (480 px and below) the panel keeps a small margin and a bottom-left modal is centred.
  • Overlay (modal): dark (default), light or none. With none the page behind stays visible and clickable and focus is not trapped. Close when the overlay is clicked (on by default) only affects clicks; the Escape key and the close button always close the survey.
  • Links and embeds: ?theme=light|dark|auto on /s/<key> and /embed/<key> wins over the survey setting; any other value is ignored. The widget script tag has no theme attribute: set the scheme in the builder.

Dark survey in an iframe

<iframe src="https://YOUR-FEEDPULSE-HOST/embed/YOUR_SURVEY_KEY?theme=dark" width="100%" height="420" style="border:0"></iframe>

The widget settings are read-only in the REST API and MCP: GET /api/v1/surveys/{id} includes a widget object with position, colorScheme, overlay and closeOnOverlayClick; change them in the dashboard.

Translations are stored per survey. Changing the default language does not translate your existing text; it only declares which language that text is in.

Start your 7-day free trial

7-day free trial. No credit card required. 14-day refund on your first payment.

Start 7-day free trial

No credit card required. Cancel anytime.