liquid_feedback_frontend

view app/main/index/_lang_chooser.lua @ 441:58647c8a0339

Show language chooser on all public pages
author bsw
date Sun Mar 11 12:35:00 2012 +0100 (2012-03-11)
parents
children 63d6549cc00b
line source
1 slot.select("title", function()
2 ui.container{
3 attr = { class = "lang_chooser" },
4 content = function()
5 for i, lang in ipairs{"en", "de", "eo"} do
6 ui.link{
7 content = function()
8 ui.image{
9 static = "lang/" .. lang .. ".png",
10 attr = { style = "margin-left: 0.5em;", alt = lang, title = lang }
11 }
12 end,
13 text = _('Select language "#{langcode}"', { langcode = lang }),
14 module = "index",
15 action = "set_lang",
16 params = { lang = lang },
17 routing = {
18 default = {
19 mode = "redirect",
20 module = request.get_module(),
21 view = request.get_view(),
22 id = param.get_id_cgi(),
23 params = param.get_all_cgi()
24 }
25 }
26 }
27 end
28 end
29 }
30 end)

Impressum / About Us