M
M
Messi2021-05-07 19:15:05
symfony
Messi, 2021-05-07 19:15:05

How to set default value in yaml translation?

Symfony 5 project, there is a messages folder, it contains the messages.en.yaml file, there is a translation:

product
          description:  This product is {title}.


In the code I call $this->translateMessage($message, ['title' => 'Title translation']);

Is it possible to somehow specify directly in the yaml file, if {title} is null, then set the default value?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question