aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.css6
-rw-r--r--dudle.rb14
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%;
+}
diff --git a/dudle.rb b/dudle.rb
index ae3e615..0b69f96 100644
--- a/dudle.rb
+++ b/dudle.rb
@@ -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)