alisalehi1380/laravel-lang-files-translator

set default lang for project.

majid-gholamheidari opened this issue · 2 comments

Hey, Thanks for your pakage.

To test your package, I first launched a Laravel app (version 10) and then tried to create a new language using your package.
But as you know, in Laravel version 10, the lang folder is not available by default and this issue causes the error.

php artisan translate:lang en fa
start translation. please wait...

The speed of translation of files depends on the speed of the Internet,
the number of file lines and the indentation of each key.
So please be patient until the translation of the files is finished.
Thankful

   RuntimeException

  lang folder 'en' not Exist !

  at vendor\laravel\framework\src\Illuminate\Support\helpers.php:333
    329▕             if (is_string($exception) && class_exists($exception)) {
    330▕                 $exception = new $exception(...$parameters);
    331▕             }
    332▕
  ➜ 333▕             throw is_string($exception) ? new RuntimeException($exception) : $exception;
    334▕         }
    335▕
    336▕         return $condition;
    337▕     }

  1   vendor\alisalehi\laravel-lang-files-translator\src\Services\TranslateService.php:101

  2   vendor\alisalehi\laravel-lang-files-translator\src\Services\TranslateService.php:38
      Alisalehi\LaravelLangFilesTranslator\Services\TranslateService::existsLocalLangDir()

hi Majid and thanks for reporting this issue.
I now, see this issue! and GitHub didn't notify me of your reporting!
You're saying right and I'll fix it as soon as possible.

I'm so sorry for the delay in replying. 🙏
@majid-gholamheidari