diff templates/sat_website/base.html @ 2:0df46e87537d

i18n: marked translatable texts + add change language form on pages footer
author Goffi <goffi@goffi.org>
date Mon, 30 Jul 2012 02:09:38 +0200
parents a49aa1b823f6
children 755ccdb0c62a
line wrap: on
line diff
--- a/templates/sat_website/base.html	Sun Jul 29 01:52:27 2012 +0200
+++ b/templates/sat_website/base.html	Mon Jul 30 02:09:38 2012 +0200
@@ -19,6 +19,7 @@
 {% endcomment %}
 
 {% load staticfiles %}
+{% load i18n %}
 
 <!DOCTYPE html>
 <html lang="en">
@@ -28,7 +29,7 @@
 		<link rel="stylesheet" href="{% static "css/bootstrap-responsive.css" %}">
 		<link rel="stylesheet" href="{% static "css/sat_website.css" %}">
 		<link rel="icon" type="image/png" href="{% static "images/sat_logo_32.png" %}">
-		<title>{% block title %}Salut à Toi: the multi-frontends, multi-purposes communication tool{% endblock %}</title>
+		<title>{% block title %}{% trans "Salut à Toi: the multi-frontends, multi-purposes communication tool" %}{% endblock %}</title>
 </head>
 <body>
 	<div class="navbar navbar-fixed-top">  
@@ -44,7 +45,7 @@
 				</ul>
                 {% if latest_dl_path and latest_version %}
                     <ul class="nav pull-right">
-                        <li><a href="{{ latest_dl_path }}"><strong>Download SàT {{ latest_version }}</strong></a> </li>
+                        <li><a href="{{ latest_dl_path }}"><strong>{% trans "Download SàT" %} {{ latest_version }}</strong></a> </li>
                         
                     </ul>
                 {% endif %}
@@ -52,5 +53,21 @@
 		</div>  
 	</div>   
 {% block content %}{% endblock %}
+	<div class="container">
+		<div class="row" id="language">
+
+				<form class="well form-inline" action="/i18n/setlang/" method="post">
+					{% csrf_token %}
+					<input name="next" type="hidden" value="{{ redirect_to }}" />
+					<select name="language">
+						{% get_language_info_list for available_languages as languages %}
+						{% for language in languages %}
+							<option value="{{ language.code }}">{{ language.name_local }} ({{ language.code }})</option>
+						{% endfor %}
+					</select>
+					<input type="submit" value="{% trans "Change language" %}" />
+				</form>
+		</div>
+	</div>
 </body>
 </html>