Method | Description | |
---|---|---|
__construct ( Illuminate\Filesystem\Filesystem $disk, string $path, array $syncPaths ) | Manager constructor. | |
collectFromFiles ( ) : array | Collect all translation keys from views files. | |
createFile ( $fileName ) : void | Create a file for all languages if does not exist already. | |
files ( ) : array | Array of language files grouped by file name. | |
fillKeys ( string $fileName, array $keys ) : void | Fills translation lines for given keys in different languages. | |
getAllViewFilesWithTranslations ( ) : array | Get found translation lines found per file. | |
getFileContent ( string $filePath, boolean $createIfNotExists = false ) : array | Get the content in the given file path. | |
getKeysExistingInALanguageButNotTheOther ( $values ) : array | Extract keys that exists in a language but not the other. | |
languages ( ) : array | Array of supported languages. | |
removeKey ( string $fileName, string $key ) : void | Remove a key from all language files. | |
setPathToVendorPackage ( string $packageName ) : void | Sets the path to a vendor package translation files. | |
writeFile ( string $filePath, array $translations ) : void | Write a language file from array. |
Method | Description | |
---|---|---|
neglectVendorFiles ( $filesByFile ) : array | Nelgect all vendor files. | |
stringLineMaker ( $array, $prepend = '' ) : string | Write the lines of the inner array of the language file. |
public __construct ( Illuminate\Filesystem\Filesystem $disk, string $path, array $syncPaths ) | ||
$disk | Illuminate\Filesystem\Filesystem | |
$path | string | |
$syncPaths | array |
public collectFromFiles ( ) : array | ||
return | array |
public createFile ( $fileName ) : void | ||
$fileName | ||
return | void |
public getAllViewFilesWithTranslations ( ) : array | ||
return | array |
public getKeysExistingInALanguageButNotTheOther ( $values ) : array | ||
$values | ||
return | array |
public setPathToVendorPackage ( string $packageName ) : void | ||
$packageName | string | |
return | void |