generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
From loadNameTranslations() in Build.php
` foreach ($locales as $locale) {
$file = match ($model) {
Country::class => __DIR__ . "/../../data/translations/countries/$locale/country.php",
Language::class => __DIR__ . "/../../data/translations/languages/$locale/language.php",
Currency::class => __DIR__ . "/../../data/translations/currencies/$locale/currency.php",
};
if ( ! file_exists($file)) {
continue;
}
$translations = require $file;
foreach ($translations as $id => $name) {
$item = $model::find($id)?->setTranslation('name', $locale, $name)->saveQuietly();
}
`
The files you look for in the match are non-existent and the translations are never set. This results in only english in the JSON object for a translatable field in the DB. Could you please have a look at this?
Metadata
Metadata
Assignees
Labels
No labels