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
This package allows switching locale easily on Laravel projects. It's so simple to use, once it's installed, your App locale will change only by passing routes into SetLanguage middleware.
9
10
11
+
## Version Compatibility
12
+
13
+
| Laravel | PHP | Package |
14
+
|---------|-----------|---------|
15
+
| 5.8 | 7.2 - 7.4 | ^2.0 |
16
+
| 6.x | 7.2 - 8.0 | ^2.0 |
17
+
| 7.x | 7.2 - 8.0 | ^2.0 |
18
+
| 8.x | 7.3 - 8.1 | ^2.0 |
19
+
| 9.x | 8.0 - 8.2 | ^2.0 |
20
+
| 10.x | 8.1 - 8.3 | ^2.0 |
21
+
| 11.x | 8.2 - 8.4 | ^2.0 |
22
+
| 12.x | 8.2 - 8.5 | ^2.0 |
23
+
10
24
**Top features:**
11
25
12
26
- Change automatically app locale depending on user browser configuration
Register the service provider in ``config/app.php``
47
+
> **Note**: Laravel 5.5+ automatically discovers the package. Manual registration is only needed for older versions.
48
+
49
+
For Laravel < 5.5, register the service provider in `config/app.php`:
34
50
35
51
```php
36
52
Akaunting\Language\Provider::class,
37
53
```
38
54
39
-
Add alias if you want to use the facade.
55
+
Add alias if you want to use the facade:
40
56
41
57
```php
42
-
'Language' => Akaunting\Language\Facade::class,
58
+
'Language' => Akaunting\Language\Facade::class,
43
59
```
44
60
45
61
### 3. Publish
46
62
47
63
Publish config, migration and blade files.
48
64
49
-
```
65
+
```bash
50
66
php artisan vendor:publish --tag=language
51
67
```
52
68
69
+
**Optional:** Publish flag images for customization (only if you want to replace flag images):
70
+
71
+
```bash
72
+
php artisan vendor:publish --tag=language-flags
73
+
```
74
+
75
+
This will copy flag images to `public/vendor/language/flags/` where you can replace them with your custom flags. The package will automatically use your custom flags if they exist, otherwise it will use the default package flags.
76
+
53
77
### 4. Migrate
54
78
55
79
@@ -181,6 +205,7 @@ If you discover any security related issues, please email security@akaunting.com
0 commit comments