Where can I change the whole layout of erpnext from LTR to RTL?

I have added my local language which is similar to Arabic and it works very fine only the layout sticks to the LTR like english, I want to switch the layout to be like Arabic as well RTL. where can I trigger this?
Thank you very much in advance

this is a screenshot of my local language which is rtl and we use majority of Arabic letters, it supposed to be like Arabic i mean the whole layout eg. sidebar should be from the right etc… now its like English :sob:


sorry to tag you bro @NCP your kind support is highly apprciated

I am not sure if this will help you but this was our experience in creating content for Arabic -RTL language- but I share if that help

1 Like

@avc can you guide on thia please

thank you very @ALAADIAA , thats great. i will consider it for frappe apps that i will be working on. I was wondering to find the function which Triggers the switch between LTR to RTL and vice versa in ERPNext. i am eagerly waiting from the community and/or Frappe team to guide on this

Sorry, @Rebaz_Balisani I can’t help here. Never managed RTL …

1 Like

Thank you @avc , no problem

I guess that but I think it maybe help if you investigate more

1 Like

Thank you brother @ALAADIAA , the problem is when adding a new language, by default it gets (dir=ltr) and there is no option anywhere in the frappe/erpnext system to define that the newly added language is RTL not LTR.

Hi @Rebaz_Balisani:

I’ve diggin’ a little about it …
Currently, this languages are defined as RTL

["ar", "he", "fa", "ps"]

I tried and it works well


Now … I don’t know how to get back! :joy: :joy:

There is the key

Hope this helps.

1 Like

you can change the layout of the system from language in system settings
but i do use RTL and i prefer to keep the system in English and change the language of the users to achive that

I appreciate your time and efforts brother, i came across it and started searching for this file but eventually i found out that its not in any of the V14 or v15 its a separate branch, i was wondering something within latest versions such as v15 or develop branch

Brother Gharieb I appreciate if you could show me a screenshot of this trigger/switch because I indeed need the rtl

Hi @Rebaz_Balisani:

There is related code on .py files too … version-15 branch.

1 Like

I actually tried on my version before i reply your message and the english just disappeared and the whole system layout convert it to RTL which i don’t know yet how i’ll convert it back. in the framework the layout should be changed based on the user language, but if you change the language of the system that will convert the layout of the desk view based on the language. in the awsome bar just write system settings or if you changed the Lang it shuold have the same meaning


brother you just changed the language. Not changing the language, chaning the ltr to the rtl, because my language does not exisit in the ERPNext/Frappe and i have added it myself. by default adding any new language to the system will be LTR so my issue is my newly added language is RTL. I hate to touch dozens of html, css, py, js files to achieve this which finally i am sure will brings up dozens of issues within website pages, doctypes, layouts, prints etc…

did you try to check your language in language list there are 80 langs in ver 15 you can enable any language from there

Hi @Rebaz_Balisani:

Best solution here could be raising an issue, asking for RTL setting for your language. Other users can benefit.

Meanwhile … maybe you can override this .py and .js methods

frappe.utils.is_rtl (js)
frappe.utils.jinja_globals.is_rtl (python)

1 Like

which language you need
image


if you create a custom lang chose in based on field a lang RTL

Thanks for your time and support, i have already chosen BASED ON: ARABIC but it did not help

Thank you very much for your support and guidance, today I subimtted a feature request for that i dont know if they will add it soon or will be for late future

1 Like