Laravel: 翻译@section中的字符串
Laravel: translate string in @section
我的 blade 模板如下所示:
@extends('layouts.main')
@section('title', 'Houses')
@section('content')
<div class="row">
... etc
如果我想这样翻译标题:
@section('title', {{ __('Houses') }})
我收到这个错误:
Facade\Ignition\Exceptions\ViewException
syntax error, unexpected '<', expecting ')' (View:
我应该如何正确翻译@section 中的字符串?
试试这个:
@section('title', __('Houses'))
我的 blade 模板如下所示:
@extends('layouts.main')
@section('title', 'Houses')
@section('content')
<div class="row">
... etc
如果我想这样翻译标题:
@section('title', {{ __('Houses') }})
我收到这个错误:
Facade\Ignition\Exceptions\ViewException syntax error, unexpected '<', expecting ')' (View:
我应该如何正确翻译@section 中的字符串?
试试这个:
@section('title', __('Houses'))