Translations
Also known as contents
, translations is a convenient way how to make applications multi-lingual. Upon opening an application, the full contents object is loaded and used for all textual content visible to the customer.
Available variables
The following variables are available in all content strings (starting from FW v5.13.0):
input
- all collected (and defaulted, prefilled) customer inputflags
- custom booleans set by the frameworkquote
- all data returned by thequote
requestasset.{ref}
- all the asset URLs available on the item leveldocument.{request}.{ref}.{"url"|"name"}
- all the dynamic documents generated by requestroute
- name of the currently active screendataset.{field_name}
- item data from data servicequery_string
- all data from query string
Interface of dataset
Usage example
Available transformers
Not always data is collected from the customers in exactly the same way as displayed back to the customer. For example, when monetary values are collected, they are converted to values in cents (1 Eur = 100
). When displaying this value back to the customer, the value needs to be converted back to the original (100
= 1 Eur). This and more is achieved with transformers.
asCurrency
When monetary values are collected they are stored as value in cents (1 Eur = 100
). In order to display these values in a human-readable way, the asCurrency
filter needs to be used. By default the global price format is used.
The price format can also be overwritten locally by providing it as arguments:
For a more detailed explanation see the price format guide.
date
Sometimes the date value collected from the customer needs to be transformed before displaying via content strings. This can be achieved with date
transformer.
By default is uses the globally defined date format (or if it's not set, then the default one in the KASKO framework).
Custom format can also be configured by passing in an additional argument.
For full information about the available formats, see the date format guide.
Last updated