File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -32,28 +32,26 @@ public function __construct(
32
32
$ this ->router = $ router ;
33
33
}
34
34
35
- public function generateAlternateLangLinks ($ extraParams = array () )
35
+ public function generateAlternateLangLinks ($ extraParams = [] )
36
36
{
37
37
$ request = $ this ->requestStack ->getMasterRequest ();
38
38
$ route = $ request ->attributes ->get ('_route ' );
39
39
40
40
foreach ($ this ->enabledLocales as $ locale ) {
41
- if ($ request ->getLocale () !== $ locale ) {
42
- $ this ->seoHelper ->addLangAlternate (
43
- $ this ->router ->generate (
44
- $ route ,
45
- array_merge (
46
- $ request ->attributes ->get ('_route_params ' ),
47
- [
48
- '_locale ' => $ locale ,
49
- ],
50
- $ extraParams
51
- ),
52
- Router::ABSOLUTE_URL
41
+ $ this ->seoHelper ->addLangAlternate (
42
+ $ this ->router ->generate (
43
+ $ route ,
44
+ array_merge (
45
+ $ request ->attributes ->get ('_route_params ' ),
46
+ [
47
+ '_locale ' => $ locale ,
48
+ ],
49
+ $ extraParams
53
50
),
54
- $ locale
55
- );
56
- }
51
+ Router::ABSOLUTE_URL
52
+ ),
53
+ $ locale
54
+ );
57
55
}
58
56
}
59
57
You can’t perform that action at this time.
0 commit comments