Closed MISTERPOTE closed 4 years ago
As the issue template suggest, please ask questions in our Slack group.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Hi everybody, I want translate my pages and posts. The config/app.php file have this :
'locale' => 'en', 'fallback_locale' => 'en',
The config/voyager.php file have this : ` 'multilingual' => [ /*
Set whether or not the multilingual is supported by the BREAD input. */ 'enabled' => true,
Select default language */ 'default' => 'en',
The vendor/tcg/voyager/src/Models/Page.php file have this : `<?php
namespace TCG\Voyager\Models;
use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Traits\Translatable;
class Page extends Model { use Translatable;
} `
The app/Page.php files have : <?php
namespace App;
use Illuminate\Database\Eloquent\Model; use TCG\Voyager\Traits\Translatable;
class Page extends Model { use Translatable; protected $translatable = ['title', 'body'];
}
The vendor/tcg/voyager/src/Models/Post.php file have : `<?php
namespace TCG\Voyager\Models;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; use TCG\Voyager\Facades\Voyager; use TCG\Voyager\Traits\Resizable; use TCG\Voyager\Traits\Translatable;
class Post extends Model { use Translatable; use Resizable;
} `
And the app/Post.php file have : `<?php
namespace App;
use Illuminate\Database\Eloquent\Model; use TCG\Voyager\Traits\Translatable;
class Post extends Model { use Translatable;
}`
In the voyager backend, only for a post, i have the english and french version but the slug can't to be change. It is the same for all language. On the frontend, if i change the language, the header and footer menus are change but not the translation of the current page/post. If i change the current english URL for the french URL, i have a 404 page.
Thank you for your futur help.