TEXT
Examples of pieces of text are:
- "thing #1"
- "March 12, 2010"
- "" (the empty text)
Text can contain letters (lower-case or upper-case), numbers, punctuation marks, other symbols, and blank spaces between words.
Text creation
The following block creates the text "hello" and stores it in the variable named greeting.
The create text with block combines (concatenates) the value of the greeting variable and the new text "world" to make the text "helloworld". Note that there is no space between them since none was in either original text.
To increase the number of text inputs, click on the gear icon, which changes the view to:
Additional inputs are added by dragging an item block from the toolbox on the left into the join block.
Format
The format block allows you to change a String containing an expression formatted according to instructions contained in a format expression. In this case, it changes the value of “hello {0}” to “hello world”. Notice that {0} here is an indicator where the text will be inserted.
To increase the number of format inputs, click on the gear icon, which changes the view to:
Additional inputs are added by dragging a "string" block from the toolbox on the left below the first string block. For example, if you have three format inputs, then you can use text with expression as below:
Render
Render block replaces values specified between the curly brackets by the corresponding values you provide additionally. Use the gear icon to add the key-value parameters.
Text translations
String with translations is the unique data type containing a string and its translation in different languages.
Set translation string parameters:
string: String with translations data type.
language: a seed instance of a Language type.
translation: translated text in the provided language.
To get a translation of a string, you need string and language parameters only.
If a String with translations is used, its value will be displayed based on a current language. If the translation on the current language doesn’t exist, the application will show the default value, which is the first value assigned, or None in case no data is provided.
Get string of
Every data type has its text representation that may be changed in its String View editor.
The get string of block is used to get the text representation of a type, instance, or variable.