Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Commit 09124cd

Browse files
AlsonicTechmartinlindhe
authored andcommitted
Laravel translation files
Option to choose which translation files to be generated
1 parent 97b240c commit 09124cd

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Generator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ private function allocateLocaleArray($path)
194194
continue;
195195
}
196196

197+
$langFiles = config('vue-i18n-generator.langFiles');
198+
if(! is_null($langFiles) && ! empty($langFiles) && ! in_array($noExt, $langFiles)) {
199+
continue;
200+
}
197201

198202
$tmp = include($fileName);
199203

src/config/vue-i18n-generator.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@
1313

1414
'langPath' => '/resources/lang',
1515

16+
/*
17+
|--------------------------------------------------------------------------
18+
| Laravel translation files
19+
|--------------------------------------------------------------------------
20+
|
21+
| You can choose which translation files to be generated.
22+
| Note: leave this empty for all the translation files to be generated.
23+
|
24+
*/
25+
26+
'langFiles' => [
27+
/*
28+
'pagination',
29+
'passwords'
30+
*/
31+
],
1632

1733
/*
1834
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)