laravel-translation
laravel-translation copied to clipboard
Possibility to scan and add missing keys from file to db without update exists translations?
In my case, I need to check the files for new keys and add them to the database, without updating/overwriting the values for the existing translations. On local add new translation to file, then upload to prod server, ansible run seeders and i need scan new translation from file and add to Database. Its possible? Or only need manualy add keys from UI to db? Thx
For my case i extended driver, add parameter $update, and change line
if ($update) {
$lang->translations()->updateOrCreate($attributes, $values);
} else {
$lang->translations()->firstOrCreate($attributes, $values);
}