diff --git a/Modules/Menu/Providers/MenuServiceProvider.php b/Modules/Menu/Providers/MenuServiceProvider.php index b4005ec3b..3783743a7 100644 --- a/Modules/Menu/Providers/MenuServiceProvider.php +++ b/Modules/Menu/Providers/MenuServiceProvider.php @@ -3,6 +3,7 @@ namespace Modules\Menu\Providers; use Illuminate\Support\ServiceProvider; +use Mcamara\LaravelLocalization\Facades\LaravelLocalization; use Modules\Core\Events\BuildingSidebar; use Modules\Core\Events\LoadingBackendTranslations; use Modules\Core\Traits\CanGetSidebarClassForModule; @@ -122,7 +123,9 @@ public function addItemToMenu(Menuitem $item, Builder $menu) ] ); } else { - $target = $item->link_type != 'external' ? $item->locale . '/' . $item->uri : $item->url; + $localisedUri = ltrim(parse_url(LaravelLocalization::localizeURL($item->uri), PHP_URL_PATH), '/'); + $target = $item->link_type != 'external' ? $localisedUri : $item->url; + $menu->url( $target, $item->title,