@@ -18,7 +18,8 @@ class ExportToCsvCommand extends Command
1818 protected $ signature = 'lang:export
1919 {--l|locale= : The locales to be exported. Separated by comma (default - base locale from config).}
2020 {--t|target= : Target languages, only missing keys are exported. Separated by comma.}
21- {--g|group= : The name of translation file to export (default - base group from config).}
21+ {--g|group= : The names of translation files to export (default - group from config).}
22+ {--exclude= : The names of translation files to exclude (default - group from config).}
2223 {--o|output= : Filename of exported translation, :locale, :target is replaced (default - export_path from config).}
2324 {--z|zip= : Zip all files.}
2425 {--X|excel : Set file encoding for Excel (optional, default - UTF-8).}
@@ -89,10 +90,11 @@ private function strToArray($string, $fallback = [])
8990 */
9091 private function getTranslations ($ locale , $ target = null )
9192 {
92- $ group = $ this ->option ('group ' ) ?: config ('lang_import_export.base_group ' );
93- $ from = LangListService::loadLangList ($ locale , $ group );
93+ $ group = $ this ->option ('group ' ) ?: config ('lang_import_export.groups ' );
94+ $ exclude = $ this ->option ('exclude ' ) ?: config ('lang_import_export.exclude_groups ' );
95+ $ from = LangListService::loadLangList ($ locale , $ group , $ exclude );
9496 if ($ target ) {
95- $ targetList = LangListService::loadLangList ($ target , $ group );
97+ $ targetList = LangListService::loadLangList ($ target , $ group, $ exclude );
9698 foreach ($ targetList as $ group => $ translations ) {
9799 foreach ($ translations as $ key => $ v ) {
98100 unset($ from [$ group ][$ key ]);
0 commit comments