File tree Expand file tree Collapse file tree
packages/govuk-frontend-review/src/views/full-page-examples/language-switcher-in-page Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ title: Apply for a driving licence
3+ name: Language switcher in page
4+ scenario: |
5+ You want to switch the page content between English and Welsh.
6+ ---
7+
8+ {% extends " layouts/full-page-example.njk" %}
9+
10+ {% from " govuk/components/language-switcher/macro.njk" import govukLanguageSwitcher %}
11+
12+ {% set pageTitle = example .title %}
13+
14+ {% block pageTitle %} {{ pageTitle }} - GOV.UK{% endblock %}
15+
16+ {% block containerStart %}
17+ {{ govukLanguageSwitcher ({
18+ ariaLabel : " Language switcher" ,
19+ items : [
20+ {
21+ text : " English" ,
22+ lang : " en" ,
23+ current : true
24+ },
25+ {
26+ text : " Cymraeg" ,
27+ lang : " cy" ,
28+ href : " #/cy"
29+ }
30+ ]
31+ }) }}
32+ {% endblock %}
33+
34+ {% block content %}
35+ <div class =" govuk-grid-row" >
36+ <div class =" govuk-grid-column-two-thirds" >
37+
38+ <h1 class =" govuk-heading-xl" >{{ pageTitle }} </h1 >
39+
40+ <p class =" govuk-body govuk-!-margin-top-6" >
41+ Use the language switcher to move to the same page in another language.
42+ </p >
43+ </div >
44+ </div >
45+ {% endblock %}
You can’t perform that action at this time.
0 commit comments