laravel-translation icon indicating copy to clipboard operation
laravel-translation copied to clipboard

Possibility to scan and add missing keys from file to db without update exists translations?

Open CrazyFreeMan opened this issue 2 years ago • 0 comments

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);
  }

CrazyFreeMan avatar Dec 28 '22 15:12 CrazyFreeMan