Skip to content

Commit

Permalink
Update TranslateFilesCommand.php (#42)
Browse files Browse the repository at this point in the history
* Update TranslateFilesCommand.php

allow to add default_target_locales in config

* Update laravel_google_translate.php
  • Loading branch information
neoteknic authored Oct 15, 2021
1 parent c5f5f1e commit 9a78079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/TranslateFilesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function handle()
{
//Collect input
$this->base_locale = $this->ask('What is base locale?', config('app.locale', 'en'));
$this->locales = array_filter(explode(",", $this->ask('What are the target locales? Comma seperate each lang key', 'tr,it')));
$this->locales = array_filter(explode(",", $this->ask('What are the target locales? Comma seperate each lang key', config('laravel_google_translate.default_target_locales','tr,it'))));
$should_force = $this->choice('Force overwrite existing translations?', ['No', 'Yes'], 'No');
$this->force = false;
if ($should_force === 'Yes') {
Expand Down
1 change: 1 addition & 0 deletions src/config/laravel_google_translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'no_requests_per_batch' => env('NO_REQUESTS_PER_BATCH', 5),
'sleep_time_between_batches' => env('SLEEP_TIME_BETWEEN_BATCHES', 1)
],
'default_target_locales'=>'tr,it',
'trans_functions' => [
'trans',
'trans_choice',
Expand Down

0 comments on commit 9a78079

Please sign in to comment.