hpolthof / laravel-translations-db

Laravel Translations from Database
https://packagist.org/packages/hpolthof/laravel-translations-db
GNU General Public License v2.0
52 stars 37 forks source link

php artisan translation:fetch failing on Windows #17

Open mst101 opened 7 years ago

mst101 commented 7 years ago

The above artisan command is failing on Windows because the cleanLocaleDir function in /src/Console/Commands/FetchCommand.php is looking for a forward slash, as opposed to a backslash.

To get my local copy to work, I changed:

protected function cleanLocaleDir($item) {
        return str_replace($this->lang_path.'/', '', $item);
}

to

protected function cleanLocaleDir($item) {
        return str_replace($this->lang_path.'\\', '', $item);
}

...but you may want to create a more robust solution?

Thanks for the handy tool though. Much appreciated!