# Code modification to support RTL (Arabic) in Badge/Poster design

**URL:** <https://talk.getindico.io/t/code-modification-to-support-rtl-arabic-in-badge-poster-design/2661>\
**Category:** General Discussion\
**Created:** [April 27, 2022, 2:32pm UTC](https://talk.getindico.io/t/code-modification-to-support-rtl-arabic-in-badge-poster-design/2661 "2022-04-27T14:32:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_Al-Shammaa](https://talk.getindico.io/user_avatar/talk.getindico.io/mohammed_al-shammaa/32/756_2.png) [@Mohammed\_Al-Shammaa](https://talk.getindico.io/u/Mohammed_Al-Shammaa)\
**Post date:** [April 27, 2022, 2:32pm UTC](https://talk.getindico.io/t/code-modification-to-support-rtl-arabic-in-badge-poster-design/2661/1 "2022-04-27T14:32:20Z")

</div>

Hi there,

I managed to add RTL (Arabic) support to Badge/Poster design with “minimal code change”. I only needed to change one file (and install some dependencies).

I needed to add the following two lines

```auto
content = arabic_reshaper.reshape(content)
content = get_display(content)

```

to `indico/modules/designer/pdf.py` right after the line:

`content = strip_tags(content)`

and of course add the following import lines in the beginning of the same file:

```auto
import arabic_reshaper
from bidi.algorithm import get_display

```

The above two packages need to be installed, so:

```auto
pip install arabic-reshaper
pip install python-bidi

```

I also added an Arabic font as described in the following post:

> [@How to add a new font to Poster and Badge Designer](https://talk.getindico.io/t/how-to-add-a-new-font-to-poster-and-badge-designer/1584/2):
>
> Hey, so, currently unfortunately we don’t support Arabic fonts in the Badge/Poster Designer. However I took a few minutes to see how complicated it would be to actually make it work. What I will present might work for you if you manage your own instance of Indico. The changes I applied to Indico: diff --git a/indico/legacy/pdfinterface/base.py b/indico/legacy/pdfinterface/base.py index 8b5554ad4e..d71b47d7a0 100644 --- a/indico/legacy/pdfinterface/base.py +++ b/indico/legacy/pdfinterface/bas…

Lastly, I restarted uWSGI:

`touch ~/web/indico.wsgi`

And it’s now working fine!
