I am creating pages from a csv in a multi language setup. I couldn’t find any documentation on where to put the translations. Right now i would update the returned page after I created it, but I am sure there is a way doing it right within the Page::create()
function.
I suppose I am asking for the correct layout of the translations array?
Here is my code so far:
foreach ($csv as $project) {
$page = Page::create([
'slug' => Str::slug($project['Title_EN']),
'template' => 'project',
'parent' => $parent,
'content' => [
'title' => $project['Title_EN'],
'client' => $project['Client_EN'],
'type' => $project['Type_EN'],
'year' => $project['Year'],
'description' => $project['Description_EN'],
],
# 'translations' => [ ????? ]
]);
}