B
B
BonBon Slick2018-09-14 11:30:10
symfony
BonBon Slick, 2018-09-14 11:30:10

Controller add flash with translation options?

trans.yml

time: You have to wait %time% minutes before request one more verification!

controller
$this->addFlash('error', 'await.time');
// %time%  is required

How to do this right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Vlastovskiy, 2018-09-15
@BonBonSlick

It is necessary to throw into the flash the already translated phrase with the necessary arguments.
Those. translate it not when outputting, but when adding to flash.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question