File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
[ ![ ko-fi] ( https://www.ko-fi.com/img/githubbutton_sm.svg )] ( https://ko-fi.com/R6R3UQ8V )
12
12
13
- Translate a URI or individual slugs.
14
-
15
13
This package registers a macro for the Laravel ` Translator ` class.
16
14
This will allow you to translate individual URI slugs, while ignoring parameter placeholders.
15
+
17
16
Parameters will not be translated by this macro. That remains the responsibility of your code.
18
17
19
18
## ✅ Requirements
@@ -31,7 +30,8 @@ composer require codezero/laravel-uri-translator
31
30
32
31
Laravel will automatically register the ServiceProvider.
33
32
34
- Then in your app's ` lang ` folder, create subdirectories for every locale you want to have translations for.
33
+ In your app's ` lang ` folder, create subdirectories for every locale you want to have translations for.
34
+
35
35
Next create a ` routes.php ` file in each of those directories.
36
36
37
37
```
42
42
└── routes.php
43
43
```
44
44
45
- Return an array of translations from the ` routes.php ` file .
45
+ Return an array of translations from the ` routes.php ` files .
46
46
47
47
### 🚀 Usage
48
48
@@ -61,7 +61,7 @@ The URI macro accepts 2 additional parameters:
61
61
Lang::uri('hello/world', 'fr', 'my-package');
62
62
```
63
63
64
- You can also use ` trans()->uri('hello/world') ` instead of ` Lang::uri() ` .
64
+ You can also use ` trans()->uri('hello/world') ` instead of ` Lang::uri('hello/world' ) ` .
65
65
66
66
### 🔌 Example
67
67
You can’t perform that action at this time.
0 commit comments