Can someone help me how i can manage to support this to work with translation text option.
<a href="{{url('account/my-review/delete/'.$value->id)}}" onclick="return confirm('Are you sure you want to delete this review?');" > <i class="fa fa-trash" style="color: #898b8d;"></i> </a>
so i want to replace text Are you sure with text translation like : {{ trans('plugins/real-estate::dashboard.no_review') }}
To read my information from my file. Any ideas how to do it? Cause if i input it like that it just skip the pop up message and directly delete the record without show message.
Advertisement
Answer
Did you wrap with single quotes the blade bindings({{}}
)? It should work like this:
onclick="return confirm('{{ trans('plugins/real-estate::dashboard.no_review') }}');"
If not, then probably need to use laravel’s __('plugins/real-estate::dashboard.no_review')
, so then:
onclick="return confirm('{{ __('plugins/real-estate::dashboard.no_review') }}');"