Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
11502 Lượt xem

Go to settings-> languages

Choose hebrew

Page should flip to RTL mode, but it stays in LTR

I can see that rtl css is being loaded:


<link type="text/css" rel="stylesheet" href="/web/content/95-2fa133e/rtl/web.assets_common.css" data-asset-xmlid="web.assets_common" data-asset-version="2fa133e">

<link type="text/css" rel="stylesheet" href="/web/content/96-d949b86/rtl/web.assets_backend.css" data-asset-xmlid="web.assets_backend" data-asset-version="d949b86">


but the page is still displayed LTR



Ảnh đại diện
Huỷ bỏ

hey , how to install rtl css on windows ; any ideas please.

Tác giả Câu trả lời hay nhất

Notice the install instructions:


For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is
needed:

#. Download and install `nodejs <https://nodejs.org/en/download/>`_.
#. Install `rtlcss`:

.. code-block:: doscon

C:\> npm install -g rtlcss

#. Edit the System Environment's variable `PATH` to add the folder where `rtlcss.cmd` is located
(typically: `C:\\Users\\<user>\\AppData\\Roaming\\npm\\`).


This should be done before you install Odoo

It works also after you install but in such case u should change some CSS to force the CSS to recompile

Ảnh đại diện
Huỷ bỏ

I checked it in one of the runbot instances and it seems to be working fine. You can check one of the running runbot instances at:

https://runbot.odoo.com/

Tác giả

I was not able to login to the runbot `You do not have access to this database or your invitation has expired. Please ask for an invitation and be sure to follow the link in your invitation email.`

Tác giả

I was able to login, please ignore my last comment (need 500 karma to delete my own comment?!)

Tác giả

U are correct, it does work in the runbot... but still doesn't solve the problem when installing from github

Tác giả

I did a diff on the CSS and it seems that the CSS on my installation is not RTL, and the runbot css is RTL

unfortunately I cannot paste the screen image to show it

Tác giả

It seems that some files that creates the RTL css is missing on my installation since I search for `.oe_module_icon` and it appears only in 1 file and is set to `float: left;` while in the runbot css it is set to `float: right;`

This explain the problem, the question is: how to solve it?

Tác giả

in runbot, it seems that the file `web.assets_backend.css` is generated in a different way when using RTL .

although both cases reference `base/static/src/css/modules.css` the `float` is somehow changes from `left` to `right`

Tác giả

I found the following:

For languages with right-to-left interface (such as Arabic or Hebrew), the package `rtlcss` is

needed:

#. Download and install `nodejs <https://nodejs.org/en/download/>`_.

#. Install `rtlcss`:

.. code-block:: doscon

C:\> npm install -g rtlcss

#. Edit the System Environment's variable `PATH` to add the folder where `rtlcss.cmd` is located

(typically: `C:\\Users\\<user>\\AppData\\Roaming\\npm\\`).

Tried it both on windows and in Ubuntu 18 (Docker) and still not RTL

Thanks for posting the final solution

Câu trả lời hay nhất

Hi Elia:

This seems to be working fine in Odoo 14. Try clearing your browser cache and see if it fixes the issue.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 24
1137
1
thg 3 21
2626
1
thg 3 15
4096
1
thg 8 15
6914
8
thg 3 25
14714