@@ -80,13 +80,13 @@ You will now find a `localizer.php` file in the `config` folder.
8080Add any locales you wish to support to your published ` config/localizer.php ` file:
8181
8282``` php
83- 'supported-locales ' => ['en', 'nl'];
83+ 'supported_locales ' => ['en', 'nl'];
8484```
8585
8686You can also use one or more custom slugs for a locale:
8787
8888``` php
89- 'supported-locales ' => [
89+ 'supported_locales ' => [
9090 'en' => 'english-slug',
9191 'nl' => ['dutch-slug', 'nederlandse-slug'],
9292];
@@ -95,7 +95,7 @@ You can also use one or more custom slugs for a locale:
9595Or you can use one or more custom domains for a locale:
9696
9797``` php
98- 'supported-locales ' => [
98+ 'supported_locales ' => [
9999 'en' => 'english-domain.test',
100100 'nl' => ['dutch-domain.test', 'nederlands-domain.test'],
101101];
@@ -136,16 +136,17 @@ Update the `stores` array to choose which stores to use.
136136
137137## 🛠️ More Configuration (optional)
138138
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).
140142
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).
142143If you do this, no additional detectors will run after the ` UrlDetector ` and ` OmittedLocaleDetector ` .
143144This makes sense, because the locale will always be determined by those two in this scenario.
144145
145146Example:
146147
147148``` php
148- 'omitted-locale ' => 'en',
149+ 'omitted_locale ' => 'en',
149150```
150151
151152Result:
@@ -155,20 +156,20 @@ Result:
155156
156157Default: ` null `
157158
158- ### ☑️ ` trusted-detectors `
159+ ### ☑️ ` trusted_detectors `
159160
160161Add any detector class name to this array to make it trusted. (do not remove it from the ` detectors ` array)
161162When a trusted detector returns a locale, it will be used as the app locale, regardless if it's a supported locale or not.
162163
163164Default: ` [] `
164165
165- ### ☑️ ` url-segment `
166+ ### ☑️ ` url_segment `
166167
167168The index of the URL segment that has the locale, when using the ` UrlDetector ` .
168169
169170Default: ` 1 `
170171
171- ### ☑️ ` route-action `
172+ ### ☑️ ` route_action `
172173
173174The custom route action that holds the locale, when using the ` RouteActionDetector ` .
174175
@@ -182,26 +183,26 @@ Route::group(['locale' => 'nl'], function () {
182183});
183184```
184185
185- ### ☑️ ` user-attribute `
186+ ### ☑️ ` user_attribute `
186187
187188The attribute on the user model that holds the locale, when using the ` UserDetector ` .
188189If the user model does not have this attribute, this detector check will be skipped.
189190
190191Default: ` locale `
191192
192- ### ☑️ ` session-key `
193+ ### ☑️ ` session_key `
193194
194195The session key that holds the locale, when using the ` SessionDetector ` and ` SessionStore ` .
195196
196197Default: ` locale `
197198
198- ### ☑️ ` cookie-name `
199+ ### ☑️ ` cookie_name `
199200
200201The name of the cookie that holds the locale, when using the ` CookieDetector ` and ` CookieStore ` .
201202
202203Default: ` locale `
203204
204- ### ☑️ ` cookie-minutes `
205+ ### ☑️ ` cookie_minutes `
205206
206207The lifetime of the cookie that holds the locale, when using the ` CookieStore ` .
207208
0 commit comments