2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template theme_boost/language_menu
20 Language menu template.
22 Context variables required for this template:
23 * title - The title of the menu (displays the text of the currently active language).
24 * items - Array of data representing the available languages to be displayed in the language menu.
25 * link - If a link is provided render it.
26 * title - The title of the language item.
27 * text - The text displayed for the language item.
28 * url - The url link to activate the given language.
29 * isactive - Whether the language is currently active.
31 Example context (json):
33 "title": "English (en)",
36 "title": "English (en)",
37 "text": "English (en)",
38 "url": "http://example.com",
44 <div class="langmenu">
45 <div class="dropdown show">
46 <a href="#" role="button" id="lang-menu-toggle" data-toggle="dropdown" aria-label="{{#str}}language{{/str}}" aria-haspopup="true" aria-controls="lang-action-menu" class="btn dropdown-toggle">
47 <i class="icon fa fa-language fa-fw mr-1" aria-hidden="true"></i>
48 <span class="langbutton">
53 <div role="menu" aria-labelledby="lang-menu-toggle" id="lang-action-menu" class="dropdown-menu dropdown-menu-right">
56 <a href="{{{url}}}" class="dropdown-item pl-5" role="menuitem" {{#isactive}}aria-current="true"{{/isactive}}
57 {{#attributes}}{{key}}="{{value}}" {{/attributes}}>