Commit 327d8a5 1 parent 618064d commit 327d8a5 Copy full SHA for 327d8a5
File tree 5 files changed +15
-7
lines changed
5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Define your website routes here
2
2
3
3
app.event :
4
- path : /event/{id}
4
+ path : /{_locale}/ event/{id}
5
5
controller : App\Controller\Website\EventWebsiteController::indexAction
Original file line number Diff line number Diff line change 10
10
<localizations >
11
11
<!-- See: http://docs.sulu.io/en/latest/book/localization.html how to add new localizations -->
12
12
<localization language =" en" default =" true" />
13
+ <localization language =" de" />
14
+ <localization language =" fr" />
13
15
</localizations >
14
16
15
17
<default-templates >
48
50
<environments >
49
51
<environment type =" prod" >
50
52
<urls >
51
- <url language = " en " >{host}</url >
53
+ <url >{host}/{localization }</url >
52
54
</urls >
53
55
</environment >
54
56
<environment type =" stage" >
55
57
<urls >
56
- <url language = " en " >{host}</url >
58
+ <url >{host}/{localization }</url >
57
59
</urls >
58
60
</environment >
59
61
<environment type =" test" >
60
62
<urls >
61
- <url language = " en " >{host}</url >
63
+ <url >{host}/{localization }</url >
62
64
</urls >
63
65
</environment >
64
66
<environment type =" dev" >
65
67
<urls >
66
- <url language = " en " >{host}</url >
68
+ <url >{host}/{localization }</url >
67
69
</urls >
68
70
</environment >
69
71
</environments >
Original file line number Diff line number Diff line change 41
41
</li >
42
42
{% endfor %}
43
43
</ul >
44
+
45
+ <div class =" navbar-nav" >
46
+ {% for localization in localizations %}
47
+ <a class =" nav-link" href =" {{ localization .url }}" >{{ localization .locale }}</a >
48
+ {% endfor %}
49
+ </div >
44
50
</div >
45
51
</nav >
46
52
</div >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function testIndexAction(): void
29
29
{
30
30
$ event = $ this ->createEvent ('Sulu is awesome ' , 'en ' );
31
31
32
- $ crawler = $ this ->client ->request ('GET ' , '/event/ ' . $ event ->getId ());
32
+ $ crawler = $ this ->client ->request ('GET ' , '/en/ event/ ' . $ event ->getId ());
33
33
34
34
$ response = $ this ->client ->getResponse ();
35
35
$ this ->assertInstanceOf (Response::class, $ response );
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function testHomepage(): void
50
50
]
51
51
);
52
52
53
- $ crawler = $ this ->client ->request (Request::METHOD_GET , '/homepage ' );
53
+ $ crawler = $ this ->client ->request (Request::METHOD_GET , '/en/ homepage ' );
54
54
55
55
$ response = $ this ->client ->getResponse ();
56
56
$ this ->assertInstanceOf (Response::class, $ response );
You can’t perform that action at this time.
0 commit comments