You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LLH is a set of tools to help you manage translations in your Laravel project. Run the `localization:missing` artisan command to automatically generate lang files according to your PHP sources.
11
8
12
-
## Table of contents
13
9
14
-
1.[Installation](#1-installation)
15
-
1.[Configuration](#2-configuration)
16
-
1.[Usage](#3-usage)
17
-
1.[Support](#4-support)
18
-
1.[Contribute](#5-contribute)
19
-
1.[Change Log](#6-change-log)
10
+
LLH is a set of tools to help you manage translations in your Laravel project.
20
11
21
-
## 1. Installation
12
+
## Installation
22
13
23
-
- Add the following line in the `require-dev` array of the `composer.json` file :
24
-
```
25
-
"potsky/laravel-localization-helpers" : "~1"
26
-
```
14
+
1 - Add the following line in the `require-dev` array of the `composer.json` file :
15
+
`"potsky/laravel-localization-helpers" : "~1.1"`
27
16
28
-
- Update your installation : `composer update`
29
-
- Add the following line in the `providers` array of the `app/config/app.php` configuration file :
Then you can modify the configuration in file `app/config/packages/potsky/laravel-localization-helpers/config.php` (Laravel 4) or `app/config/laravel-localization-helpers.php` (Laravel 5).
61
49
62
50
Add new folders to search for, add your own lang methods or functions, ...
63
51
64
-
### Backup files
65
-
66
-
You should not include backup lang files in GIT or other versioning systems.
67
-
68
-
In your `laravel` folder, add this in `.gitignore` file :
69
-
70
-
```
71
-
# Do not include backup lang files
72
-
app/lang/*/[a-zA-Z]*.[0-9_]*.php
73
-
```
74
-
75
-
## 3. Usage
52
+
## Usage
76
53
77
-
### 3.1 Command `localization:missing`
54
+
### Command `localization:missing`
78
55
79
-
This command parses all your code and generates according lang files in all `lang/XXX/` directories.
56
+
This command parses all your code and generate according lang files in all `lang/XXX/` directories.
80
57
81
58
Use `php artisan help localization:missing` for more informations about options.
Use `php artisan help localization:clear` for more informations about options.
228
-
229
-
#### *Examples*
230
-
231
-
##### Remove all backups
232
-
233
-
```
234
-
php artisan localization:clear
235
-
```
236
-
237
-
##### Remove backups older than 7 days
238
-
239
-
```
240
-
php artisan localization:clear -d 7
241
-
```
242
-
243
-
## 4. Support
244
-
245
-
Use the [github issue tool](https://github.com/potsky/laravel-localization-helpers/issues) to open an issue or ask for something.
246
-
247
-
## 5. Contribute
248
-
249
-
1. Fork it
250
-
2. Create your feature branch (`git checkout -b my-new-feature`)
251
-
3. Commit your changes (`git commit -am 'Added some feature'`)
252
-
4. Push to the branch (`git push origin my-new-feature`)
253
-
5. Create new Pull Request
254
-
255
-
Tests are in `tests`. To run the tests: `vendor/bin/phpunit`.
256
-
257
-
Coverage cannot decrease next a merge. To track file coverage, run `vendor/bin/phpunit --coverage-html coverage` and open `coverage/index.html` to check uncovered lines of code.
258
-
259
-
## 6. Change Log
260
-
261
-
### v1.4
262
-
263
-
- new command `localization:clear` to remove backups
264
-
- new command `localization:translate` to translate a sentence with Bing Translator
265
-
- new options to specify output formatting
266
-
- new option to let the command translate sentences for you with Bing Translator
267
-
- new lemma are now marked with the `TODO:` prefix by default (*if you ran two times the missing artisan command without translating lemma next to the first run, your missing translation were lost in the lang file. Now by default, just search for TODO in your lang file!*)
268
-
- simplified service provider, no need to load distinct providers according to Laravel version
193
+
## Support
269
194
270
-
Internally :
195
+
Use the github issue system to open a issue and ask for something.
271
196
272
-
- totally refactored
273
-
- unit tests
274
-
- test coverage
275
-
- facade to let you use localization helpers in your code
197
+
## Change Log
276
198
277
199
### v1.3.2
278
200
279
-
- fix incompatibility with Laravel 5.2 ([#16](https://github.com/potsky/laravel-localization-helpers/issues/16))
201
+
- fix incompatibility with Laravel 5.2 [#16](https://github.com/potsky/laravel-localization-helpers/issues/16)
0 commit comments