Strings
Introduction
The most basic element supported by ESCL is a plain string. A string represents a line of text containing any character supported by the current locale, and may also include clauses to enable dynamic processing.
Simple strings
In this example, the hello_message
identifier represents the string Hello, World!
. This string requires no processing or formatting and will be returned verbatim.
Compound strings
A compound string is a string that is constructed by combining one or more strings. Using a clause, we can pass in the identifier of another string to insert it in place. Each string is processed independently before being combined.
In this example, tos_message
will become Please accept our Terms of Service
for en-US and Accepter nos conditions d'utilisation, s'il vous plaît
for fr-CA.
Notice how the translation of tos_message
is rearranged in French? This is possible because the concatenation isn't hard-coded in our application but is instead handled with a compound string.
Aliases
An alias is a string that contains a single clause which references another string without any additions or modifications.
Last updated