@register.simple_tag
def locale_dir():
 return ((trans_real.get_language_bidi() and 'rtl') or 'ltr')

@ register . simple_tag def locale_dir ( ) : return ( ( trans_real . get_language_bidi ( ) and 'rtl' ) or 'ltr' )
returns current locales direction .