themsaid / laravel-langman

Language files manager in your artisan console.
MIT License
876 stars 166 forks source link

setExtension, setExcludeExtensions & Support .json #113

Open anirbansanu opened 1 year ago

anirbansanu commented 1 year ago

Now, 1 . you can set extension using setExtension(string $extension) 2 . you can set extension using setExcludeExtensions(array $exclude_extensions) 3 . you can get all the json file content as php assoc array from getJsonFilesContent($filesByFile,$lang)
i ) $filesByFile -> return value of files() method ii ) $lang -> provide language which is in the language file path

  1. filterByIncludedFileNames($filesByFile,$includedFileNames) -> you can include only specified names of files.
  2. filterByExcludedFileNames($filesByFile,$excludedFileNames) -> Exclude only specified names of files.
  3. getSupportedLanguages($filesByFile) -> you can get all supported languages after exclude or include.
  4. writeFile($filePath, array $translations) -> updated for json file.
  5. stringJsonLineMaker($translations) -> json string maker added for json file.