Merhaba, çok basit bir yerde sorunum var tam olarak herşeyi doğru yaptığımı düşünüyorum ama yine de atladığım yanlış yaptığım birşey var sanırım. Aşağıda basit bir kayıt işlemi yapmaya çalışıyorum dili türkçe yapmama rağmen validation mesajları ingilizce olarak gözükmekte bunun sebebi ne olabilir acaba?
Route::get('/', array('as' => 'home', function()
{
App::setLocale('tr');
var_dump(App::getLocale());
return View::make('index');
}));
Route::post('post', array('as' => 'post', function()
{
$formData = array(
'title' => Input::get('title'));
$rules = array(
'title' => 'required');
$validation = Validator::make($formData, $rules);
if($validation->fails()) {
return Redirect::route('home')->withErrors($validation)->withInput();
}
$article = new Post();
$article->title = $formData['title'];
$article->save();
return Redirect::route('home');
}));
Eğer app.php dosyasında locale alanını elle tr yaparsam türkçe mesajlar gözüküyor ama setLocale fonksiyonu ile değiştirince çalışmıyor.
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',