Forums

How to evaluate i18n in Script?

marco.jacob 31 Mar, 2020
Hello,

we use Chronoforms6 for our registration form.

On sending the form, there is a request to a database. If the email is known by a third party, there is a different text presented to the user than otherwise.
However, at this part we set a variable by a script and afterwards display the content of the variable.

So far we realized it this way in setup of a form:
- evaluate recaptcha
- success: access DB and set a variable checkmembership={I:CF6_MEMBERSHIP}
- success: display a page with some text and variable {var:checkmembership}

The page content part evaluates {var:checkmembership} to {I:CF6_MEMBERSHIP}, but that is not evaluated to the language specific string, which means no iterative evaluation is done.

What might be the apropriate solution?
- do some magic so {var:checkmembership} evaluates to {I:CF6_MEMBERSHIP} and that evaluates to the desired text?
- access the i18n string itself in the script?
- something completely different?

Kind regards,
Marco
Max_admin 08 Apr, 2020
Hi Marco,

You can use the Data Builder for that, you use it to set some variable to some value (language string?) and then use that variable later!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.