Answer the question
In order to leave comments, you need to log in
When to use translation options?
I don’t understand why add a parameter when you can simply display, say, the name of the city after the user’s name. For example
{{'hello|trans'}} {{ $user->name }} {{ $user->cityName }}
{{ 'hello.user'|trans({'params': {'name' : $user->name, ... }})}}
Answer the question
In order to leave comments, you need to log in
Because
`Hello username from cityname`
`Hello username from cityname`
In the first case, you have to write
{{'hello|trans'}} {{ $user->name }} {{'from|trans'}} {{ $user ->cityName }}
And it may also happen that in some language the word order will be different*
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question