Reputation: 19695
In laravel 5, when I write this in my view:
@include("places.form", ["submitButton" => @lang('crud.updateModel', ['currentModelName' => $currentModelName])])
I get this:
@lang('crud.addModel', ['currentModelName' => Lugar])
How can I do so that it can be interpreted?
Upvotes: 0
Views: 52
Reputation: 14747
Try:
@include("tournaments.form", ["submitButton" => trans('crud.addTournament')])
You will get:
["submitButton" => 'the translated text']
Upvotes: 1
Reputation: 4688
{{ }}
and {!! !!}
are just a wrapper around <?php echo ?>
therefore in all Blade directives you don't have to add it use type as if you are typing in PHP file! use you translation function without curly brackets, and you don't need the double quotations too:
@include("tournaments.form", ["submitButton" => trans('crud.addTournament') ])
Upvotes: 0