Bob Ross
Bob Ross

Reputation: 31

Laravel: translate string in @section

My blade template looks like this:

@extends('layouts.main')

@section('title', 'Houses')

@section('content')
<div class="row">
... etc

If I want to translate the title like this:

@section('title', {{ __('Houses') }})

I get this error:

Facade\Ignition\Exceptions\ViewException syntax error, unexpected '<', expecting ')' (View:

How should I correctly translate string in @section ?

Upvotes: 1

Views: 359

Answers (1)

Alex
Alex

Reputation: 2775

Try this:

@section('title', __('Houses'))

Upvotes: 1

Related Questions