How to set the menu bar direction to right to left (RTL) in ElectronJS

464 Views Asked by At

I'm building an ElectronJS app in Arabic but I'm not able to set the menu bar direction to right to left (RTL).

I even tried to change the dir attribute of the body tag but it didn't work too.

<body dir="rtl">

Any idea?

1

There are 1 best solutions below

0
On BEST ANSWER

The electron should automatically respect the configuration of the operating system. You can activate RTL by running the electron with the rtl parameter as follows.

--force-ui-direction=rtl

However, the RTL orientation of the menu itself cannot be configured.

Also see this

Thanks and best regards!