I18n translate label and value form in template

As in the topic. I have set the main language for the application, but I would like to change some form elements (label or value) already in the theme. Is there a way to do it?

Thank you for your answers

I’m sorry, but I don’t understand exactly what you’re trying to do. You want to add translations in the view script / template?
Maybe you can provide some code or pseudo code to show your intention.

Hi,

I solved the problem by injecting an instance of the Translator class into the Form along with an additional language parameter (different from global). Thread to close.

Best regards

The translation is done in the view layer and not in the form itself. You can set a different translator for the related view helper but maybe a different locale or translation text domain is enough for your use case.

Can mark an answer as solution.