Skip to content

Commit 28ab43b

Browse files
committed
Readme update
1 parent 0aa4542 commit 28ab43b

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,35 @@ php artisan translation:scan
5757
```
5858

5959

60-
## Customization
60+
## Configuration
6161

62-
### Publishing the configuration
63-
64-
You can change the default paths to scan your application from, the output directory where your JSON translation files are located, and even the file extensions you want to scan from.
62+
### Publishing configuration
6563

6664
First, publish the configuration file:
6765

6866
```
6967
php artisan vendor:publish --provider="JsonTranslationHelper\TranslationHelperServiceProvider"
7068
```
7169

72-
Then in the `config/translation-helper.php` you can change default values of `scan_directories`, `file_extensions`, `output_directory` and `translation_methods`.
70+
It will bring you `config/translation-helper.php` configuration file.
71+
72+
Read the following sections of what you can configure.
73+
74+
### Directories
75+
76+
To specify where you want to scan for translation strings, just modify `scan_directories` array:
77+
```php
78+
/**
79+
* Directories to scan for missing translation keys.
80+
*/
81+
'scan_directories' => [
82+
app_path(),
83+
resource_path('views'),
84+
resource_path('assets'),
85+
],
86+
```
7387

74-
### Extending file extensions
88+
### File extensions
7589

7690
Our package scans only `.php` files out of the box.
7791

@@ -87,7 +101,7 @@ You can add more file extensions to `file_extensions` array in the `config/trans
87101
],
88102
```
89103

90-
### Modifying translation helper methods
104+
### Translation helper methods
91105

92106
By default our package looks for `lang` and `__` translation helper methods or mixins.
93107

0 commit comments

Comments
 (0)