php - Parameters inside Laravel localized string -


i'd have in lang/en/mymsgs.php

'string1' => 'welcome %1, please meet %2' 

i provide content %1 , %2 when getting 'string1' code.

i couldn't find way this. pointers?

as recall, laravel message localization uses named, not numeric, parameters.

rewriting example message:

'string1' => 'welcome :user, please meet :other', 

you can use, example:

trans('string1', [ 'user' => 'ainsley', 'other' => 'hayden' ]); 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -