@@ -249,7 +249,7 @@ to adapt some translations to another instance of your application, or to a spec
249
249
customer.
250
250
251
251
The structure of a custom language is: ` existing language code ` + ` - ` + ` custom text ` , where
252
- ` custom text ` can only contain alphanumeric character and ` - ` .
252
+ ` custom text ` can only contain alphanumeric characters and ` - ` .
253
253
254
254
Examples: ` en-microsoft ` or ` fr-BE-custom ` .
255
255
@@ -265,22 +265,22 @@ The easiest way to change the current locale is with the `set.locale` Middleware
265
265
// in routes/web.php
266
266
267
267
// Solution 1: Apply the locale selection to root.
268
- // => https://yourdomain.com?locale=fr
268
+ // => https://yourdomain.com?locale=fr
269
269
Route::get('/', function () {
270
270
return view('welcome');
271
271
})->middleware('set.locale');
272
272
273
273
// Solution 2: Apply the locale selection to many routes.
274
- // => https://yourdomain.com/...?locale=fr
274
+ // => https://yourdomain.com/...?locale=fr
275
275
Route::middleware('set.locale')->group(function () {
276
276
Route::get('/', function () {
277
277
return view('welcome');
278
278
});
279
279
});
280
280
281
281
// Solution 3: prefix your routes with the locale and apply it.
282
- // => https://yourdomain.com/fr
283
- // => https://yourdomain.com/fr/...
282
+ // => https://yourdomain.com/fr
283
+ // => https://yourdomain.com/fr/...
284
284
Route::prefix('{locale?}')->middleware('set.locale')->group(function() {
285
285
Route::get('/', function () {
286
286
return view('welcome');
0 commit comments