Translation, theme and reusable sets
This page covers three views of the designer: Translation, Theme and Composites.
Translation
Section titled “Translation”A form can be filled in in more than one language. Every text (label, description, option, page title, messages) is entered separately for each language; the person sees the form in their own language, and the submitted answers do not depend on the language.
Adding a language
Section titled “Adding a language”- Open the Translation view in the designer. Its heading is “The form’s translations”.
- In the Languages section, choose a Language to add or type the language code (such as
enoren-US) and click Add language. If the code is invalid you get the warning “This is not a language code.”, and if the language is already there, “This language is already on the form.” Only the languages your organization allows can be added; a form can have at most 20 languages. - Next to each language you see how many texts are translated or missing (“12 missing”). From the language’s menu you can change the default language with Make … the default, and remove the language and its texts with Remove … (Undo brings it back).
So that the person can switch language while filling in, turn on Language choice while filling in the form settings.
Translating texts
Section titled “Translating texts”In the view’s table each row is a text and each column a language. Writing here changes the text itself; you see the same text in the design view too.
Filters (Filter the texts):
- Search: search within the texts.
- Page: All pages, The form itself or a specific page.
- Only what is missing: only texts with an empty translation.
- Which texts: What the form uses or All of them, with buttons and error messages (to also change the text of buttons such as Next and Submit and of the standard error messages).
Rich texts (text blocks) are not edited in the table; it reads “Rich text: edited in the design view.”, and Show in design takes you to the element.
Translating with a file
Section titled “Translating with a file”To hand the translation to a translator or a translation tool:
- In the Translating with a file section, click Download as CSV or Download as XLIFF. For XLIFF, choose the XLIFF target language.
- Have the file translated. The first column of the CSV is
keyand must not be changed; fill in the language columns. - Choose the file with Read from a file.
- The What the file changes window shows what will be written: how many texts will be written; rows that will not be read because their key is not on the form, their language is not on the form, they do not fit the format or they are too long; and texts whose source has changed since.
- Apply the translations to the form with Write, or Cancel. Written texts can be taken back with Undo.
Only XLIFF 1.2 is read. Very large files are not accepted.
The Theme view (“The form’s look”) changes only this form’s colours, font and title area; it does not affect the rest of Defthand. No CSS is written.
Ready themes and colours
Section titled “Ready themes and colours”- Choose one of the Ready themes: Ocean, Forest, Sunset, Plum, Slate, Paper.
- If you like, change the colours one by one. Colors of the light theme and Colors of the dark theme are set separately:
- Accent: buttons and selected items.
- Fill: the background of filled areas.
- Text on the fill: the text on top of the fill.
- Surface: the form’s background.
- Text: the text colour.
A colour is written with six hex digits (such as
#1a5fb4). A colour left empty uses Defthand’s own colour.
- Font: System font, Serif, Monospace.
- Spacing: Tight, Normal, Wide.
- Corners: Square, Slightly rounded, Rounded.
- Frame: Card (the form sits in a card) or No line.
The Preview on the right shows a sample page with the look you chose; Show in the dark theme shows the dark version. To remove the theme, use Remove the theme.
Title area and logo
Section titled “Title area and logo”The The form’s title section arranges the area at the very top of the form:
| Setting | What it does |
|---|---|
| Title, Description | The title and text shown at the top of the form. |
| Logo | A logo uploaded with Choose a file. |
| The logo’s text | A description for people who cannot see the logo, for example “Şirket logosu”. Required if there is a logo; if it is empty the form is not published. |
| Logo position | At the start, In the center, At the end. |
| Logo size | Small, Medium, Large. |
| Layout | Logo above the title or Logo beside the title. |
| Background picture | A decorative picture placed behind the title area. |
Composites
Section titled “Composites”To use a set of questions in several places or several times (for example “Adres”: İl, İlçe, Açık adres), you make a composite. Every copy in the form is an ordinary Field group; its answer and rules behave like a group, and it is edited in the design view.
Making a composite
Section titled “Making a composite”- First, in the design view, build a Field group and add the questions to it.
- In the Composites view, in the Make one from a group section, choose the Group, type the Name (“Adres”) and click Make composite.
Adding a copy
Section titled “Adding a copy”On the composite’s line, Add to page: a copy of the composite is added to the end of the selected page. Change the copy’s key
(e.g. ev_adresi, is_adresi).
Parameters
Section titled “Parameters”So that copies can differ a little from each other, you define parameters (at most 50 per composite):
- Under Parameters, click Add parameter.
- Set the Parameter name (starts with a lowercase letter), the Kind (Text (per language), Text, Number, Yes/no), the Element to write to and Where to write (for example a question’s label or whether it is required).
- In each copy, enter the parameter’s value or leave it As defined.
Example: a baslik parameter on the “Adres” composite; “Ev adresi” in one copy and “İş adresi” in the other.
Keeping copies up to date
Section titled “Keeping copies up to date”The Copies list shows the state of each copy:
- “The composite is at version 3: this copy is behind.” Update from composite brings the copy to the latest version of the composite; answer ids are kept.
- “Its questions differ from the composite.” To carry a change you made in the copy over to the composite, use Update composite from this; the composite’s version goes up.
- Detach: the copy stays as an ordinary group and its link to the composite is cut.
If you delete the composite with Remove, its copies stay as ordinary groups.