Click or drag to resize

FieldModelTranslatable Property

Defines if the field value is translable.

Namespace:  Livit.Learn.Model
Assembly:  Livit.Learn.Model (in Livit.Learn.Model.dll) Version: 0.0.0.0
Syntax
C#
public string Translatable { get; set; }

Property Value

Type: String
Remarks

After the field is marked as Translatable the platform sends its value to the Translation Service and stores received translation inside a table (FieldValue=TranslatedFieldValue).

It means that the phrase stored inside such field becomes internally translated and whenever it is going to be shown on UI the translated value should be shown.

In order to access the translated value inside expressions the FieldTranslatedValue extension should be used.

Examples
Define the field:
XML
<Field Id="testField1" Value="This is the tootlip that should be translated" Translatable="true" />
Use it somewhere:
XML
<Element Id="DoorElement_small" Tooltip="{FieldTranslatedValue testField1}" GameObjectId="Door" />
Examples
A more advanced example with field values assigned to each other. Define the fields:
XML
<Field Id="Tooltip1_Translatalbe" Value="This is the tootlip that should be translated" Translatable="true" />
<Field Id="Tooltip3_Translatable_AssignedToTranslatable" Value="The new tooltip value was translated" Translatable="true" />
Set one field value to another:
XML
<SetField FieldId="Tooltip1_Translatalbe" Value="{FieldTranslatedValue Tooltip3_Translatable_AssignedToTranslatable}" />
See Also