Get a translation template
Returns the form as a translation into another language, with every text still in the form’s own language. Translate the texts, by hand, with a translation agency or with your own tools, and send the result back with Save a translation. Needs the forms:read scope and editor access to the form.
GET
https://api.responsly.com/v1/forms/{form_id}/translations/{lang_code}/template lang_code is the language you are adding, such as pl, de or zh-TW. It cannot be the form’s own language.
Add a language in three steps
Section titled “Add a language in three steps”- Get the template for the language.
- Translate the texts in
formand the messages inmessages. - Send
formandmessageswith Save a translation. Ifversionis notnull, the language already exists: sendversionin theIf-Matchheader.
Example
Section titled “Example”curl https://api.responsly.com/v1/forms/Dg8Lz5ep/translations/de/template \ -H "Authorization: Bearer <token>"{ "lang_code": "de", "source_language": "en", "version": null, "form": [ { "id": "w1", "ref": "w1", "type": "welcome_page", "title": "Hello", "properties": { "description": "", "button_text": "Start" } }, { "id": "q1", "ref": "q1", "type": "multiple_choice", "title": "What should we order?", "properties": { "description": "", "other_choice_label": "" }, "choices": [ { "ref": "c1", "label": "Pizza" }, { "ref": "c2", "label": "Sushi" } ] }, { "id": "q2", "ref": "q2", "type": "opinion_scale", "title": "How hungry are you?", "properties": { "description": "", "labels": ["Not at all", "", "Very"] } }, { "id": "e1", "ref": "e1", "type": "end_page", "title": "Thanks!", "properties": { "description": "", "button_label": "" } } ], "messages": { "next": "Weiter", "send": "Senden" }, "messages_to_translate": []}| Field | Description |
|---|---|
lang_code | The language of the template. |
source_language | The form’s own language: the language of the texts in form. |
version | null for a new language. For one the form already has, its current version, to send in If-Match when you save. |
form | The welcome page, the questions (with their answers, rows and scale labels) and the end pages, matched to the form by ref. |
messages | Buttons, errors and other built-in texts, see Messages. |
messages_to_translate | Keys of messages that are still in English and need translating. |
What to translate
Section titled “What to translate”- In
form:title,properties.description,properties.button_text,properties.button_label,properties.other_choice_label,properties.labels, and thelabel,questionandsub_labelsofchoicesandquestions. - Leave
id,refandtypeas they are: they tie each text to its part of the form. - Keep inserted values such as
{{component:q1}}or{{hidden:name}}and formatting such as**bold**and links as they are. - An empty text can stay empty: the form shows its own language there.
messagescome from the language’s built-in set, so for most languages they are already translated. You can still change them. For a language without a built-in set they are in English, listed inmessages_to_translate. Messages a language already has saved are kept, so your own wording stays.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 | The token lacks forms:read, or the form belongs to another team or a workspace you cannot edit. |
422 | The language is the form’s own, or the language code is not valid. |