phplaraveltranslationlaravel-localization

Laravel language translation error with place holder texts


In my laravel application, I have a user registration form.

Since the application is a multilingual one, I'm trying to translate each and every single text, including the placeholder texts.

{!! Form::text('first_name', null, array('placeholder' => ''.{{ __('texts.First Name') }}.'','class' => 'form-control txt_txt')) !!}
{!! $errors->first('first_name', '<span class="help-block" role="alert">:message</span>') !!}

When I try to run this, it keeps giving me an error saying

ParseError
syntax error, unexpected '<' 

Solution

  • No need of curly braces inside Form::text

    {!! Form::text('first_name', null, array('placeholder' => __('texts.First Name'),'class' => 'form-control txt_txt')) !!}