jeudi 1 septembre 2016

Laravel 5.2 Localization , attributes nog showing up when switching language

Using Laravel 5.2.41

Using following translation package: mcamara/laravel-localization

Link inside my view :

<a href=""> Edit Link</a>

routes.php files inside Lang/fr & Lang/nl

<?php
return [
    'account-edit'      => "account/wijzig-gegevens/{id}", 
];

<?php
return [
    'account-edit'      => "donnees/modifier-donnees/{id}", 
];

Laravel routes file:

 Route::group([

    'prefix' => LaravelLocalization::setLocale(),
    'middleware' => ['localize','localeSessionRedirect', 'localizationRedirect' ]

    ], function()
    {

Route::get(LaravelLocalization::transRoute('routes.account-edit'),'AccountController@edit');

});

When i look at the link in my default language (nl) i get the correct link like so:

<a href="http://ift.tt/2bFwUmv">Edit Link</a>

But when i change my language to french i get following link:

<a href="http://ift.tt/2bKmZth}">Edit Link</a>

Can't figure out why this is happening



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire