Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!2807
Issue
#2953640
: URL language detection with empty path prefix not working
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#2953640
: URL language detection with empty path prefix not working
issue/drupal-2953640:2953640-url-language-detection
into
11.x
Overview
0
Commits
4
Pipelines
8
Changes
2
Open
Dieter Holvoet
requested to merge
issue/drupal-2953640:2953640-url-language-detection
into
11.x
2 years ago
Overview
0
Commits
4
Pipelines
8
Changes
2
Expand
0
0
Merge request reports
Compare
11.x
version 13
5cd62ff6
1 year ago
version 12
864f85e9
1 year ago
version 11
63be4102
1 year ago
version 10
56683561
1 year ago
version 9
bc8a02ab
1 year ago
version 8
f58e31c6
1 year ago
version 7
f58e31c6
1 year ago
version 6
5c9f8c9d
1 year ago
version 5
e43d230e
1 year ago
version 4
8eb107d8
1 year ago
version 3
fc745b7c
1 year ago
version 2
c737d452
1 year ago
version 1
392f1919
2 years ago
11.x (HEAD)
and
latest version
latest version
42f8ee0d
4 commits,
1 year ago
version 13
5cd62ff6
3 commits,
1 year ago
version 12
864f85e9
2 commits,
1 year ago
version 11
63be4102
1 commit,
1 year ago
version 10
56683561
880 commits,
1 year ago
version 9
bc8a02ab
888 commits,
1 year ago
version 8
f58e31c6
887 commits,
1 year ago
version 7
f58e31c6
7 commits,
1 year ago
version 6
5c9f8c9d
6 commits,
1 year ago
version 5
e43d230e
5 commits,
1 year ago
version 4
8eb107d8
4 commits,
1 year ago
version 3
fc745b7c
3 commits,
1 year ago
version 2
c737d452
2 commits,
1 year ago
version 1
392f1919
1 commit,
2 years ago
2 files
+
55
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
+
5
−
0
Options
@@ -72,6 +72,11 @@ public function getLangcode(?Request $request = NULL) {
if
(
$negotiated_language
)
{
$langcode
=
$negotiated_language
->
getId
();
}
// Handle empty path prefix:
if
(
$negotiated_language
===
FALSE
&&
((
$no_prefix_langcode
=
array_search
(
''
,
$config
[
'prefixes'
]))
!==
FALSE
))
{
$langcode
=
$no_prefix_langcode
;
}
break
;
case
LanguageNegotiationUrl
::
CONFIG_DOMAIN
:
Loading