This software provides context processors and helpers for Bidirectional Text (BIDI) in Django templates. It helps in handling text alignment and direction in templates thereby ensuring correct rendering of right-to-left languages like Arabic and Hebrew.
In terms of context processors, all you need to do is add it to TEMPLATE_CONTEXT_PROCESSORS in your project's settings.py. The module provides the following template variables: LANGUAGE_DIRECTION, LANGUAGE_START, LANGUAGE_END, and LANGUAGE_MARKER. These variables help you define the direction of your current language, start and end of the language layout, and language marker entity, respectively.
Moving on to filters, django-bidi-utils has a filter called add_direction which adds direction to the element arguments. This filter is especially useful for developers who want the direction to appear only in certain cases. For instance, rtl_only adds the direction only in case of a right-to-left language. Similarly, both adds the direction in both cases while ltr_only adds the direction only in case of a left-to-right language.
Overall, django-bidi-utils can be a great addition to your Django project if you're dealing with BiDi languages. The module is easy to use and provides helpful templates and filters to make your work easier.
Version 0.2.1: N/A