REDCap:EM - ML - Creating fields with translations: Unterschied zwischen den Versionen

Aus Appdoc-Public
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: «== In general == Creating multilingual fields always comprises two steps: # Create the field and save & exit it # Edit it again to add the translations»)
 
 
Zeile 5: Zeile 5:
 
# Create the field and save & exit it
 
# Create the field and save & exit it
 
# Edit it again to add the translations
 
# Edit it again to add the translations
 +
 +
== Data input fields, example: text field ==
 +
 +
===Create Text field===
 +
[[Datei:multilingual_7.png|601x401px]]
 +
 +
===Add translations===
 +
[[Datei:multilingual_8.png|353x448px]]
 +
 +
== Required fields ==
 +
=== Make field required ===
 +
[[Datei:required_1png.png|133x28px]]
 +
 +
=== Add the following to each translation ===
 +
Add the following to each translation<br />
 +
<code><p<nowiki />><span<nowiki /> class="multilingual"; style="color:red;">*TRANSLATION</span<nowiki />></code>
 +
for example:
 +
 +
<code><p<nowiki />><span<nowiki /> class="multilingual"; style="color:red;">*must provide value</span<nowiki />></code>
 +
 +
<code><p<nowiki />><span<nowiki /> class="multilingual"; style="color:red;">*Pflichtfeld</span<nowiki />></code>
 +
 +
<code><p<nowiki />><span<nowiki /> class="multilingual"; style="color:red;">*doit fournir de valeur</span<nowiki />></code>
 +
 +
<code><p<nowiki />><span<nowiki /> class="multilingual"; style="color:red;">*italiano Pflichtfeld</span<nowiki />></code>
 +
 +
[[Datei:required_2.png|349x178px]]
 +
 +
=== Tip: use again the label box and put all languages there for convenience ===
 +
[[Datei:required_3.png|486x149px]]<br />
 +
This results in the following display in the instrument’s list of fields<br />
 +
[[Datei:required_4.png|529x182px]]
 +
 +
=== Check the result in the survey ===
 +
After refreshing your survey page, it will look like this:<br/>
 +
[[Datei:required_5.png|491x227px]]
 +
 +
== Validated fields ==
 +
=== Add field and fill in Text Box, Field Label, Variable name, Validation===
 +
[[Datei:validated_1.png|601x402px]]
 +
=== Add translations===
 +
 +
{|
 +
! [[Datei:validated_2.png|343x60px]]
 +
!
 +
 +
|-
 +
| [[Datei:validated_3.png|343x108px]]
 +
| Add the translations for the field label
 +
|-
 +
| [[Datei:validated_4.png|343x97px]]
 +
| Add the translations for the error messages that appear if the validation of entered values fails<br />
 +
(if not done in module configuration)
 +
|-
 +
| [[Datei:validated_5.png|344x97px]]
 +
| Provide values that appear in the answers section, in this case the text on the today-button:[[Datei:validated_7.png|146x24px]]
 +
|}
 +
 +
=== Check result in your survey===
 +
[[Datei:validated_6.png|538x346px]]

Aktuelle Version vom 15. Februar 2021, 18:55 Uhr

In general

Creating multilingual fields always comprises two steps:

  1. Create the field and save & exit it
  2. Edit it again to add the translations

Data input fields, example: text field

Create Text field

Multilingual 7.png

Add translations

Multilingual 8.png

Required fields

Make field required

Required 1png.png

Add the following to each translation

Add the following to each translation
<p><span class="multilingual"; style="color:red;">*TRANSLATION</span> for example:

<p><span class="multilingual"; style="color:red;">*must provide value</span>

<p><span class="multilingual"; style="color:red;">*Pflichtfeld</span>

<p><span class="multilingual"; style="color:red;">*doit fournir de valeur</span>

<p><span class="multilingual"; style="color:red;">*italiano Pflichtfeld</span>

Required 2.png

Tip: use again the label box and put all languages there for convenience

Required 3.png
This results in the following display in the instrument’s list of fields
Required 4.png

Check the result in the survey

After refreshing your survey page, it will look like this:
Required 5.png

Validated fields

Add field and fill in Text Box, Field Label, Variable name, Validation

Validated 1.png

Add translations

Validated 2.png
Validated 3.png Add the translations for the field label
Validated 4.png Add the translations for the error messages that appear if the validation of entered values fails

(if not done in module configuration)

Validated 5.png Provide values that appear in the answers section, in this case the text on the today-button:Validated 7.png

Check result in your survey

Validated 6.png