Currently the new backend (in CiviCRM) uses the ts() (or E::ts()) function for translation, but that means that the target language is defined by the contact linked to the API, not the frontend user.
We should allow the frontend to pass the locale it requests the form to be in: labels, options, error messages, etc.
This was rudimentarily implemented in the RemoteEvent extension, see HERE and used HERE, albeit not all the way.
This has now been fully implemented in systopia/de.systopia.remoteevent#69 and should be reviewed for which parts can be migrated to de.systopia.remotetools.
Currently the new backend (in CiviCRM) uses the
ts()
(orE::ts()
) function for translation, but that means that the target language is defined by the contact linked to the API, not the frontend user.We should allow the frontend to pass the locale it requests the form to be in: labels, options, error messages, etc.
This was rudimentarily implemented in the RemoteEvent extension, see HERE and used HERE, albeit not all the way.