(안 우분투하지만 예 Mac에서) 작동하지 않습니다와 명령 하나,하지만 번역을 요청하면 항상 기본 지역화를 반환합니다.L5.1 - 나는 <code>App::setLocale('locale')</code> 내가 <code>App::getLocale()</code> 반환 올바른 작업을 수행 할 때 때문에</em> 작업처럼 보이는 <em>와 로케일을 변경하면 현지화, 나는 명령이 <code>SendReminders</code> 불렀다
이 내 SendReminders 클래스 : 나는 현지화 작업을 할 뭔가를 누락
<?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use App;
use Exception;
use Storage;
use Lang;
class SendReminders extends Command
{
protected $signature = 'send:reminders';
public function __construct(){
parent::__construct();
}
public function handle(){
App::setLocale('EN');
echo App::getLocale()."\n"; // <= Shows correctly 'EN'
echo Lang::get('general.contact')."\n"; // <= Shows correctly 'Contact'
App::setLocale('DE');
echo App::getLocale()."\n"; // <= Shows correctly 'DE'
echo Lang::get('general.contact')."\n"; // <= Doesn't show the correct value
}
}
?
편집 : 일부 떼어 놓다 동작은 내 맥에 있기 때문에 무슨 일이 일어나고
노력하고 있지만 리눅스 (우분투)에 내가 그것을 해결 내 폴더 /resources/lang/de/