diff options
-rw-r--r-- | default.css | 6 | ||||
-rw-r--r-- | dudle.rb | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/default.css b/default.css index cf22491..59c9cfc 100644 --- a/default.css +++ b/default.css @@ -306,3 +306,9 @@ form#ac_participant, form#ac { form#ac_participant, form#ac, form#ac_admin{ padding: 1em; } + +div#languageChooser{ + margin-top: 2em; + text-align: center; + font-size: 80%; +} @@ -166,6 +166,20 @@ READY def out @html << wizzard_nav if @is_config && @wizzardindex != @configtabs.size() -1 + + @html.add_cookie("lang",@cgi["lang"],"/",Time.now + (1*60*60*24*365)) if @cgi.include?("lang") + @html << "<div id='languageChooser'>" + lang = [ + ["en", "English"], + ["de", "Deutsch"] + ] + lang.each{|short,long| + @html << "<a href='?lang=#{short}'>" unless short == GetText.locale.language + @html << long + @html << "</a>" unless short == GetText.locale.language + } + @html << "</div>" + @html << "</div>" @html << "</div></body>" @html.out(@cgi) |