tanmuhittin / laravel-google-translate

Translate translation files to other languages using google translate or another translation api
MIT License
424 stars 71 forks source link

Empty file produces an error+ variable translation #4

Closed RhRU closed 5 years ago

RhRU commented 5 years ago

When I try to translate the files I get the following error

In TranslateFilesCommand.php line 202:

Invalid argument supplied for foreach()

Also tried a lang with and without files created laravel version 5.8.15

The reason why this does it because the file was empty (no translation yet in the base locale)

Other issue I found is that it also translates the name of the variable passed to the translation example eng variable is :error and in german it is :fehler