diff options
author | Jiyda Mint Moussa <jiydam@gmail.com> | 2013-04-29 00:01:30 +0300 |
---|---|---|
committer | Jiyda Mint Moussa <jiydam@gmail.com> | 2013-04-29 00:01:30 +0300 |
commit | 4a4e4e4ae83d6ff3f09580238049e74444b01416 (patch) | |
tree | 58083423f1e9217fe53c371c83046f012dbb5fc8 /mediagoblin/templates | |
parent | 8f88b1f6dc88f76b5e01bc43db26055ab3fbc921 (diff) | |
download | mediagoblin-4a4e4e4ae83d6ff3f09580238049e74444b01416.tar.lz mediagoblin-4a4e4e4ae83d6ff3f09580238049e74444b01416.tar.xz mediagoblin-4a4e4e4ae83d6ff3f09580238049e74444b01416.zip |
Added rtl language support
RTL languages like Arabic, Hebrew etc were displayed from left
to right. I fixed this by adding a function to check
whether the language of the locale is rtl and change the
direction of the html in "base.html" accordingly.
[Fixes #220]
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/base.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 9c42a756..83bc65d4 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -16,11 +16,12 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. -#} <!doctype html> + <html {% block mediagoblin_html_tag %} {% endblock mediagoblin_html_tag %} > - <head> + <head {% if is_rtl %} dir="rtl" {% endif %}> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title> @@ -48,6 +49,7 @@ {% endblock mediagoblin_head %} </head> <body> + <div {% if is_rtl %} dir="rtl" {% endif %}> {% include 'mediagoblin/bits/body-start.html' %} {% block mediagoblin_body %} {% block mediagoblin_header %} @@ -133,5 +135,6 @@ </div> {%- endblock mediagoblin_body %} {% include 'mediagoblin/bits/body-end.html' %} - </body> + </div> + </body> </html> |