Commit 7e88ec52 authored by Georg Bauer's avatar Georg Bauer
Browse files

fixed #2089: added language bidirectional support and updated the admin to use...

fixed #2089: added language bidirectional support and updated the admin to use it. thanks meir@mksoft!


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 05b1a70d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@import url('base.css');

body {
    direction: rtl;
}
+7 −0
Original line number Diff line number Diff line
@import url('login.css');
@import url('base_rtl.css');
@import url('layout_rtl.css');

.login .form-row { float:right; }
.login .form-row label { float:right; padding-left:0.5em; padding-right:0; text-align:left;}
.login .submit-row { clear:both; padding:1em 9.4em 0 0; }
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}">
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base{% if LANGUAGE_BIDI %}_rtl{% endif %}.css{% endblock %}" />
{% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %}
</head>
+1 −1
Original line number Diff line number Diff line
{% extends "admin/base_site.html" %}
{% load i18n %}

{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %}
{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login{% if LANGUAGE_BIDI %}_rtl{% endif %}.css{% endblock %}
{% block bodyclass %}login{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}{% endblock %}
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@ def i18n(request):
        context_extras['LANGUAGE_CODE'] = request.LANGUAGE_CODE
    else:
        context_extras['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
    
    from django.utils import translation
    context_extras['LANGUAGE_BIDI'] = translation.get_language_bidi()

    return context_extras

def request(request):
Loading