Skip to content

Conversation

@ivanchenkoandriy
Copy link

.env

APP_LOCALE=en_AE

config/laravellocalization.php

'localesMapping' => [
'en_AE' => 'en-ae',
],
'hideDefaultLocaleInURL' => true,

test

$routeUrl = route('site.home');
$result = LaravelLocalization::localizeURL($routeUrl);
$result = 'http://my.site/en-ae';

must be

$result = 'http://my.site/';

# .env
APP_LOCALE=en_AE
# config/laravellocalization.php
'localesMapping' => [
        'en_AE' => 'en-ae',
],
'hideDefaultLocaleInURL' => true,
# test
$routeUrl = route('site.home');
$result = LaravelLocalization::localizeURL($routeUrl);
$result = 'http://my.site/en-ae';
# must be 
$result = 'http://my.site';
Fix locale comparison in URL parsing logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant