spatie/laravel-translatable
Add multilingual fields to Eloquent models using a simple HasTranslations trait. Store translations as JSON on the model (no extra tables). Set/get translations per locale, switch app locale, fetch all translations, and even translate nested JSON keys via -> notation.
You can forget a translation for a specific field using the forgetTranslation function:
public function forgetTranslation(string $attributeName, string $locale)
Here's an example:
$newsItem->forgetTranslation('name', 'nl');
You can forget all translations for a specific locale:
public function forgetAllTranslations(string $locale)
Here's an example:
$newsItem->forgetAllTranslations('nl');
How can I help you explore Laravel packages today?