aboutsummaryrefslogtreecommitdiff
path: root/budget/templates/layout.html
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-10-17 00:03:41 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-10-17 00:03:41 +0200
commitdb7e1496b0af8f6270b8304055f2aabb2428fbe0 (patch)
tree27e3abb27642a3b5bb341316de4a7fa77599f88d /budget/templates/layout.html
parentf7a969240a984c6eb63662331ad7767283088efc (diff)
downloadihatemoney-mirror-db7e1496b0af8f6270b8304055f2aabb2428fbe0.zip
ihatemoney-mirror-db7e1496b0af8f6270b8304055f2aabb2428fbe0.tar.gz
ihatemoney-mirror-db7e1496b0af8f6270b8304055f2aabb2428fbe0.tar.bz2
Add the ability to change the language explicitely. I'm not sure the UI is better with this. Any thoughts are welcome. Fix #35
Diffstat (limited to 'budget/templates/layout.html')
-rw-r--r--budget/templates/layout.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index e6614d8..c546e1e 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -41,7 +41,10 @@
</script>
</head>
<body>
-
+{% macro translations() %}
+<li {% if g.lang == "fr" %}class="active"{% endif %}><a href="{{ url_for(".change_lang", lang="fr") }}">fr</a></li>
+<li {% if g.lang == "en" %}class="active"{% endif %}><a href="{{ url_for(".change_lang", lang="en") }}">en</a></li>
+{% endmacro %}
<div class="topbar">
<h3><a class="logo" href="{{ url_for(".home") }}">#! money?</a></h3>
{% if g.project %}
@@ -64,6 +67,11 @@
<li><a href="{{ url_for(".exit") }}">{{ _("Logout") }}</a></li>
</ul>
</li>
+ {{ translations() }}
+ </ul>
+ {% else %}
+ <ul class="nav secondary-nav">
+ {{ translations() }}
</ul>
{% endif %}
</div>