@@ -25,12 +25,39 @@ <h1>{{page.title}}</h1>
2525 </ div >
2626 </ section >
2727
28- < section class ="table-of-content content-primary ">
28+ < section class ="table-of-content ">
2929 < div class ="wrap scala2 ">
3030 < div class ="language-header ">
3131 < h1 > Scala 2</ h1 >
3232 </ div >
33- < div class ="inner-box ">
33+ < div class ="inner-box ">
34+ < div class ="language-dropdown inverted ">
35+ < div id ="dd " class ="wrapper-dropdown " tabindex ="1 ">
36+ < span > Language</ span >
37+ < ul class ="dropdown "> </ ul >
38+ </ div >
39+ </ div >
40+
41+ < ul id ="available-languages " style ="display: none; ">
42+ {% if page.languages %}
43+ < li > < a href ="{{ site.baseurl }}{{ page.url }} "> English</ a > </ li >
44+ {% for l in page.languages %}
45+ {% capture intermediate %}{{ page.url }}{% endcapture %}
46+ {% capture rootTutorialURL %}{{ intermediate | remove_first: '/' }}{% endcapture %}
47+ {% assign lang = site.data.languages[l] %}
48+ < li > < a href ="{{ site.baseurl }}/{{ l }}/{{ rootTutorialURL }} " class ="lang "> {{ lang.name }}</ a > </ li >
49+ {% endfor %}
50+ {% elsif page.language %}
51+ {% assign engPath = page.url | remove_first: "/" | remove_first: page.language | remove_first: "index.html" %}
52+ {% assign engPg = site.pages | where: 'partof', page.partof | first %}
53+ < li > < a href ="{{ site.baseurl }}{{ engPath }} "> English</ a > </ li >
54+ {% for l in engPg.languages %}
55+ {% assign lang = site.data.languages[l] %}
56+ < li > < a href ="{{ site.baseurl }}/{{ l }}{{ engPath }} " class ="lang "> {{ lang.name }}</ a > </ li >
57+ {% endfor %}
58+ {% endif %}
59+ </ ul >
60+
3461 {% include documentation-sections.html sections=page.scala2-sections %}
3562 </ div >
3663 </ div >
@@ -39,7 +66,7 @@ <h1>Scala 2</h1>
3966 < div class ="language-header ">
4067 < h1 > Scala 3 (Preview)</ h1 >
4168 </ div >
42- < div class ="inner-box ">
69+ < div class ="inner-box ">
4370 < blockquote >
4471 Scala 3 has not been released, yet. We are still in the process of writing the documentation for Scala 3.< br />
4572 You can < a href ="/scala3/contribute-to-docs.html "> help us to improve the documentation</ a > .
0 commit comments