Laravel中标题的翻译不起作用

问题描述 投票:0回答:1

我收到了这个通知(resources/views/vendor/notifications/email.blade.php):

@lang( "If you’re having trouble clicking the ":actionText" button, 
    copy and paste the URL below\n". 'into your web browser: 
    :actionURL', [ 'actionText' => $actionText, 'actionURL' => $actionUrl])

现在我想在de.json目录中使用resource/lang翻译那个:

{ 
    "If you’re having trouble clicking the \":actionText\" button, 
    copy and paste the URL below into your web browser: [:actionURL] . 
    (:actionURL)": "Falls Du Probleme dabei hast, den \":actionText\" 
    Button anzuklicken, rufe folgende URL auf: [:actionURL](:actionURL)"
}

我用这种方式创建的所有其他翻译工作正常。我怎么解决这个问题?

laravel laravel-5 laravel-blade
1个回答
1
投票

只需删除连接点并将所有单词放在同一个字符串中,如下所示:

{

"If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\ninto your web browser: [:actionURL](:actionURL)" : "Caso não seja possível clicar no botão \":actionText\", copie e cole no seu navegador o endereço a seguir: [:actionUrl](:actionUrl) \n",

}
© www.soinside.com 2019 - 2024. All rights reserved.