@@ -80,13 +80,13 @@ You will now find a `localizer.php` file in the `config` folder.
80
80
Add any locales you wish to support to your published ` config/localizer.php ` file:
81
81
82
82
``` php
83
- 'supported-locales ' => ['en', 'nl'];
83
+ 'supported_locales ' => ['en', 'nl'];
84
84
```
85
85
86
86
You can also use one or more custom slugs for a locale:
87
87
88
88
``` php
89
- 'supported-locales ' => [
89
+ 'supported_locales ' => [
90
90
'en' => 'english-slug',
91
91
'nl' => ['dutch-slug', 'nederlandse-slug'],
92
92
];
@@ -95,7 +95,7 @@ You can also use one or more custom slugs for a locale:
95
95
Or you can use one or more custom domains for a locale:
96
96
97
97
``` php
98
- 'supported-locales ' => [
98
+ 'supported_locales ' => [
99
99
'en' => 'english-domain.test',
100
100
'nl' => ['dutch-domain.test', 'nederlands-domain.test'],
101
101
];
@@ -136,16 +136,17 @@ Update the `stores` array to choose which stores to use.
136
136
137
137
## 🛠️ More Configuration (optional)
138
138
139
- ### ☑️ ` omitted-locale `
139
+ ### ☑️ ` omitted_locale `
140
+
141
+ If you don't want your main locale to have a slug, you can set it as the ` omitted_locale ` (not the custom slug).
140
142
141
- If you don't want your main locale to have a slug, you can set it as the ` omitted-locale ` (not the custom slug).
142
143
If you do this, no additional detectors will run after the ` UrlDetector ` and ` OmittedLocaleDetector ` .
143
144
This makes sense, because the locale will always be determined by those two in this scenario.
144
145
145
146
Example:
146
147
147
148
``` php
148
- 'omitted-locale ' => 'en',
149
+ 'omitted_locale ' => 'en',
149
150
```
150
151
151
152
Result:
@@ -155,20 +156,20 @@ Result:
155
156
156
157
Default: ` null `
157
158
158
- ### ☑️ ` trusted-detectors `
159
+ ### ☑️ ` trusted_detectors `
159
160
160
161
Add any detector class name to this array to make it trusted. (do not remove it from the ` detectors ` array)
161
162
When a trusted detector returns a locale, it will be used as the app locale, regardless if it's a supported locale or not.
162
163
163
164
Default: ` [] `
164
165
165
- ### ☑️ ` url-segment `
166
+ ### ☑️ ` url_segment `
166
167
167
168
The index of the URL segment that has the locale, when using the ` UrlDetector ` .
168
169
169
170
Default: ` 1 `
170
171
171
- ### ☑️ ` route-action `
172
+ ### ☑️ ` route_action `
172
173
173
174
The custom route action that holds the locale, when using the ` RouteActionDetector ` .
174
175
@@ -182,26 +183,26 @@ Route::group(['locale' => 'nl'], function () {
182
183
});
183
184
```
184
185
185
- ### ☑️ ` user-attribute `
186
+ ### ☑️ ` user_attribute `
186
187
187
188
The attribute on the user model that holds the locale, when using the ` UserDetector ` .
188
189
If the user model does not have this attribute, this detector check will be skipped.
189
190
190
191
Default: ` locale `
191
192
192
- ### ☑️ ` session-key `
193
+ ### ☑️ ` session_key `
193
194
194
195
The session key that holds the locale, when using the ` SessionDetector ` and ` SessionStore ` .
195
196
196
197
Default: ` locale `
197
198
198
- ### ☑️ ` cookie-name `
199
+ ### ☑️ ` cookie_name `
199
200
200
201
The name of the cookie that holds the locale, when using the ` CookieDetector ` and ` CookieStore ` .
201
202
202
203
Default: ` locale `
203
204
204
- ### ☑️ ` cookie-minutes `
205
+ ### ☑️ ` cookie_minutes `
205
206
206
207
The lifetime of the cookie that holds the locale, when using the ` CookieStore ` .
207
208
0 commit comments