Skip to main content
Version: 9.2

Language / Translations

The HybridForms App supports three options of language control.

Info

Currently fully supported are English and German.

App Settings

First of all there is the option of choosing the App language itself: the user can operate the App by selecting the preferred language in the App settings.

Settings page - Language
Settings page - Language

Form Definition

The further two options are defined inside the form definition and the server side template settings.
These options are regardless of the user defined App settings.

Any form item (i.e. any HTML page) is provided by default with a language definition.

<html lang="en" class="...

This HTML code fragment is automatically inserted by generating the form item and is controlled by the server side temlate definition.

Template settings - Language/culture
Template settings - Language/culture

Info

This language definition affects the default behaviour of the form controls "DatePicker", "TimePicker" and "NumericField" unless any explicitly defined options.

Form Translation

Generally a form template is designed for one language, but the HybridForms App supports a "life" translation of form items.

To use this option the HTML template has to contain placeholders for any text element and any win-data-option of type "String" to be translated. Define these placeholders by enclosing the placeholder-id with curly brackets and mark the id with an at-sign.

    <var data-hf-name="Title">{{@Title}}</var>
<li data-hf-title="{{@StructureTitles.Controls}}">...</li>

Provide the translations of each placeholder inside the "translation.json"-file provided as part of the form definiton.

{
"keys": {
"de-DE": {
"Title": "QA Testformular 1",
"ShortTitle": "QA Short Title 1",
"Pages.ListTitle": "QA Testformular",
"ApproveButton.Title": "Formular Abschluss",
"ApproveButton.Label": "Abschluss",
"ApproveButton.Message": "Wollen Sie dieses Formular wirklich abschließen?",
"ApproveButtonST1.Title": "Abschluss der Basistests",
"ApproveButtonST1.Label": "Abschluss Basistests",
"ApproveButtonST1.Message": "Wollen Sie die Basistests wirklich abschließen und die Tests der Repeating Units starten?",
"StructureTitles.Controls": "Formularelemente",
"StructureTitles.InputControls": "Eingabefelder",
"StructureTitles.Media-InkControls": "Medien/Zeichnungen",
"StructureTitles.Repeating1": "Wiederholungseinheit #1",
"StructureTitles.RUs": "Wiederholungs\\neinheiten",
"StructureTitles.Specials": "Kundenspezifische Elemente",
"StructureTitles.Conditions": "Bedingungen",
"StructureTitles.PageConditions": "Bedingungen (Seiten)",
"StructureTitles.Success0": "Ergebnis",
"StructureTitles.Success1": "Ergebnis",,
"Listelement": "Benutzer",
"heading1": "Buttons - Verortung & Kommunikation",
"heading2": "Buttons - Scannen",
"address-city": "Adresse: Ort",
"address-street": "Adresse: Straßenname + Nr.",
"address-zip": "PLZ",
"phonebtn-lbl": "Kunde",
"mailbtn-lbl": "Senden",
"check1": "Punkt <strong>1</strong>",
"tooltip-checkboxh": "Label für eine Gruppe von Checkboxen - Mehrfachauswahl nötig (box1 oder box8 UND box3 oder box4) - HTML-Auszeichnung des Textes - Deaktivierung von #1 um zweite Reihe einzublenden, aktivierte Checkboxen in Reihe 2 deaktivieren #1",
"option": "Auswahl",
"platzhalter": "Platzhalter: Text",
"errorMessage": "Maximal fünf Zeichen möglich!",
"Fav.Fav1": "Gruppiert nach Bearbeitungsdatum, sortiert nach ComboBox-Wert",
"Fav.Fav2": "In der letzten Woche geänderte Formulare",
"Level1.Level2": "Das ist die Übersetzung für den Key: Level1.Level2",
"Salad": "Salat",
"enable": "aktivere mich",
"Branding": "HybridForms® ist eine Marke von icomedias"
},
"en-US": {
"Title": "QA Testform 1",
"ShortTitle": "QA Kurztitel 1",
"Pages.ListTitle": "QA Testform",
"ApproveButton.Title": "Approve Form Confirmation",
"ApproveButton.Label": "Approve",
"ApproveButton.Message": "Do you really want do approve this form?",
"ApproveButtonST1.Title": "Finish Basic Form Controls Test",
"ApproveButtonST1.Label": "Finish Basic Tests",
"StructureTitles.Controls": "Controls",
"StructureTitles.InputControls": "Input Controls",
"StructureTitles.Media-InkControls": "Media/InkControls",
"StructureTitles.Repeating1": "Repeating Unit #1",
"StructureTitles.RUs": "Repeating Units",
"StructureTitles.Specials": "Customer defined elements",
"StructureTitles.Conditions": "Conditions",
"StructureTitles.PageConditions": "Page Conditions",
"StructureTitles.Success0": "Result",
"StructureTitles.Success1": "Result",
"Listelement": "User",
"heading1": "Buttons - Location & Communication",
"heading2": "Buttons - Scans",
"address-city": "Address: City",
"address-street": "Address: Street name + no",
"address-zip": "ZIP Code",
"phonebtn-lbl": "Customer",
"mailbtn-lbl": "Send",
"check1": "Check <strong>1</strong>",
"tooltip-checkboxh": "Label for group of checkboxes - multiple choice required (box1 or box8 AND box3 or box4) - HTML labels used - Uncheck #1 to show second row, checked boxes of row 2 disable #1",
"option": "Select",
"platzhalter": "Placeholder: Text",
"errorMessage": "Only maximum of five tokens possible!",
"Fav.Fav1": "Grouping by Last Modified Date, Sorting by Combobox Values",
"Fav.Fav2": "Last week modified form items",
"Level1.Level2": "This is the translation for the key: Level1.Level2",
"Salad": "Salad",
"enable": "enable me",
"Branding": "HybridForms® is a brand by icomedias"
}
},
"langSchema": [
"de",
"en"
],
"langLabels": [
"Deutsch",
"Englisch"
],
"langDefault": "en",
"langPDF": "user-defined",
"langCulture": [
"de-DE",
"en-US"
],
"schemaVersion": "1.0.0"
}

The JSON-file has to contain the key-value pairs "langSchema", "langLabels", "langCulture", "langDefault", "langPDF", "schemaVersion" and the "keys" with all of the defined text element placeholders.

keyvaluedescription
langSchema*["de, en" ]Provide an array of the language abbreviations for any languge your form should be translated into.
langLabel*["Deutsch", "English"]Provide an array of the language names for any languge your form should be translated into.
langDefault*"en"Provide the default language of a new created form item.
langCulture*"["de-DE", "en-US" ]"Provide an array of the HTML language codes.
langPDF"user-defined" The option "user-defined" forces the pdf creator to create the PDF in the currently by the user selected language. This key is optional - not defined the PDF creator uses the language defined by the key-value pair "langDefault"
keys"keys": { "de-DE": { "Title": "QA Testformular 1", "ShortTitle": "QA Short Title 1", ... }, "en-US":: { "Title": "QA Testformular 1", "ShortTitle": "QA Short Title 1", ... }}Provide the text variants for all of your placeholders.
schemaVersion*"schemaVersion": "1.0.0"Define the schemaVersion for downwarding compatibility of the translation.json file.
Info

Please keep in mind the sequence inside the values: the defined langSchema ["de, en, fr" ] must be matched by the placeholder values ["de-DE", "en-US", "fr-Fr" ] for a correct translation!