diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-17 00:03:41 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-10-17 00:03:41 +0200 |
| commit | db7e1496b0af8f6270b8304055f2aabb2428fbe0 (patch) | |
| tree | 27e3abb27642a3b5bb341316de4a7fa77599f88d /budget/templates | |
| parent | f7a969240a984c6eb63662331ad7767283088efc (diff) | |
| download | ihatemoney-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')
| -rw-r--r-- | budget/templates/layout.html | 10 |
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> |
