Documentserver: RTL in Editors

Created on 14 Jan 2016  ·  92Comments  ·  Source: ONLYOFFICE/DocumentServer

RTL in Editors please!!!! (Hebrew, Arabic)

enhancement

Most helpful comment

Yep! RTL is needed please...
If you support for RTL languages, you will have a great new community in many other countries which use Persian, Arabic, Hebrew....
I tested all office suits in linux to have the most compatible suit with MS-Office. Believe me OnlyOffice is the best, but for RTL :-(

All 92 comments

Thanks a lot for the suggestion
It will be added in a future update, unfortunately I cannot specify the time frames.
BTW Feel free to share your suggestion in the Documents section on our developers forum.

Could you guide us about how can we implement this feature , we have many open source projects that can get huge benefit from implementing the RTL Languages

How can I help you?

Yep! RTL is needed please...
If you support for RTL languages, you will have a great new community in many other countries which use Persian, Arabic, Hebrew....
I tested all office suits in linux to have the most compatible suit with MS-Office. Believe me OnlyOffice is the best, but for RTL :-(

Believe me OnlyOffice is the best

Thanks a lot for your kind feedback.
We understand that RTL is very important feature and hope to implement it in the near future.

+1

+1

For a great app this is a big disadvantage, please add RTL feature ASAP.

Please add RTL support.

This essential feature will help many languages including Arabic, Hebrew, Persian, Urdu, Sindhi, Kashmiri, Pashto and many more.

That said, without the support of RTL and other such essential features, claiming high fidelity with MS Office does not stand correct. Also, when comparing it with other tools in the same category, it talks about what ONLYOFFICE can do that others can't, but it does not mention anything the other way. This could be a good marketing strategy, but hiding lack of capabilities is not good for users that they would discover later.

I see OnlyOffice (testing Desktop version here) as so broken from text rendering standpoint and that is not just about supporting RTL, it seems OnlyOffice is not able to handle ligatures, which is first step toward supporting Arabic and also other non-RTL scripts characters joining thing,

image

So the first step would be fixing English ligatures(!) that which surprisingly will also fix much of RTL supporting issue if you get it correctly.

(Edit: probably I should have commented on https://github.com/ONLYOFFICE/DesktopEditors/issues/10 if this issue is not available on web version)

Please add RTL support

Hello
Thanks for the nice website
You promised an update on the issue of right to left in new update will be resolved, but still has problems :(

Hello @kiani37
We understand the importance of RTL languages implementation and have already included it in roadmap. But unfortunately we could not specify any time frames for it. We will inform you in our changelog as soon as right-to-left is supported.

Hello @JohnPerkin
Thank you for your quick reply
this is the best office that I have ever used for Linux, which is even better than MS Office, Liberoffice ( Collabora Online)
I appreciate it if this change happens as soon as possible.
Thanks a lot...

Is there any updates about RTL support in the near future?

@ONLYOFFICE, FYI to add bidi-directional support (LTR, RTL and mixed) in Web interface is as simple to add to element dir=auto.

@laukstein: FYI to add bidi-directional support (LTR, RTL and mixed) in Web interface is as simple to add to element dir=auto.

If I remember correctly, they are using canvas with custom rendering logic. Hence many native browser capabilities might not be available.

Please add RTL support

i can't write arabic after installing document server from onlyoffice
what is that ?????????

most linux apps support to write arabic except onlyoffice why????????????????

Hi All
Is there any way to support rtl languages now?

Hi
You promise the rtl problem is resolved in version 4.5. Based on the
roadmap you set. But nothing has happened yet.

On Sat, Feb 10, 2018 at 5:20 PM, Navpreet2289 notifications@github.com
wrote:

Hi All
Is there any way to support rtl languages now?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/DocumentServer/issues/19#issuecomment-364656310,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AantGba7EbM98FZMHFTvtRlAiM4-i5Qyks5tTZ6YgaJpZM4HFSBt
.

@kiani37 there was never plans for RTL in 4.5 in roadmap.
But in current state we have no specific date for RTL, it will be released "when it's done"

Thank you, but you see this page.

https://github.com/ONLYOFFICE/DocumentServer/blob/master/Roadmap.md

in part of " Planned for future versions "

On Mon, Feb 12, 2018 at 11:38 AM, Pavel Lobashov notifications@github.com
wrote:

@kiani37 https://github.com/kiani37 there was never plans for RTL in
4.5 in roadmap.
But in current state we have no specific date for RTL, it will be released
"when it's done"


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/DocumentServer/issues/19#issuecomment-364851610,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AantGfpeHrHTVG9BpYCrBhjXtxHpZ_iGks5tT_FsgaJpZM4HFSBt
.

As you might noticed, it is planned for future versionS. They have not
clarified which version. It's for future, maybe 4.5, maybe 5, mabe 8!!!

We will be so glad and thankful if developers add RTL as soon as possible.
On Feb 17, 2018 10:01 AM, "kiani37" notifications@github.com wrote:

Thank you, but you see this page.

https://github.com/ONLYOFFICE/DocumentServer/blob/master/Roadmap.md

in part of " Planned for future versions "

On Mon, Feb 12, 2018 at 11:38 AM, Pavel Lobashov >
wrote:

@kiani37 https://github.com/kiani37 there was never plans for RTL in
4.5 in roadmap.
But in current state we have no specific date for RTL, it will be
released
"when it's done"


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
364851610>,
or mute the thread
AantGfpeHrHTVG9BpYCrBhjXtxHpZ_iGks5tT_FsgaJpZM4HFSBt>
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ONLYOFFICE/DocumentServer/issues/19#issuecomment-366421174,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQ3ARTyop-ndpkKPMlu96fyWokvdW2fJks5tVnJOgaJpZM4HFSBt
.

After 2 years !!!

we need RTL Support

any update?

Please add RTL support for the next release, it is a critical feature for this product.

Kindly add the RTL support and arabic language pack.
thank you in advance

+1

Already added the RTL?
onlyoffice is so good software is the only thing that really lacks it! Has anyone added or found a way to add this?

Any news for this feature ?

Hey there's some news when it comes in? Many versions have passed since they promised it

We are not able to fully migrate. Half of our documents are still in google docs. Any hard dates for RTL support? Please let us know.

Z

We announce then RTL will be ready, this is still not a high priority task.
You can contact [email protected] to speed up things

Is RTL available in a paid version of DocumentServer?

Z

@zkhaial no

Is there progress on adding RTL? news? something?

More than 400 Million people read and write in Persian and Arabic language , it seems you don't want to missed that.
👍

Believe me OnlyOffice is the best

Thanks a lot for your kind feedback.
We understand that RTL is very important feature and hope to implement it in the near future.

in the "near future" - does this mean in august of 2158?
January 14, 2019 will be 3 years of this issue. THREE YEARS!

omg, three years waiting 👎

No RTL after 3 years :D

Please add RTL support or let us know what we can do to make that happen

@Itay1787 As I said earlier - You can contact [email protected] to speed up things

TAKE A STEP TO SOLVE THIS NOW !

Please contribute to solve this issue, over here :

https://www.bountysource.com/issues/29888497-rtl-in-editors

Feel free to donate your money to any cause, but please note that this site is not related in any way to us as ONLYOFFICE

This is the solution :)

This javascript function change the direction of your Editor automatically
`function isUnicode(str) {
var letters = [];
for (var i = 0; i <= str.length; i++) {
letters[i] = str.substring((i - 1), i);
if (letters[i].charCodeAt() > 255) { return true; }
}
return false;
}

function detectDirection(field) {
var val = field.value;
if (isUnicode(val)) {
field.style.direction = "rtl";
}
else {
field.style.direction = "ltr";
}
}
`

to use this function just add onkeyup="detectDirection(this);" to any HTML filed you want to apply auto RTL and LTR

`


`

@samiklah This won't work with languages other than RTL ones and English (not to even talk about emojis and special symbols). Also I am quite sure the developers know how to solve this but they just aren't getting around to it. If you have a solution, submit a PR to onlyoffice. This code snippet currently does not help the users in this thread.

This would be a way to detect RTL correctly, but again, it is not a solution.

function isRTL(s){           
    let ltrChars    = 'A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF'+'\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF',
        rtlChars    = '\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC',
        rtlDirCheck = new RegExp('^[^'+ltrChars+']*['+rtlChars+']');

    return rtlDirCheck.test(s);
};

Three and a half years later, still no signs of RTL support... sigh.

Not support RTL yet?

Hi,

Do you think that you'll support RTL anytime soon? I believe that most of the relevant code is available from projects like open-office or libreoffice...

It looks like a really good alternative for MS-Office but I won't be able to use it without proper RTL support... )-:

T.I.A

Hi dear developers,
Are OnlyOffice closed?
Still developing OnlyOffice?
If so then what excuse do you have to tell us that you do not yet have RTL support ???????
Three and a half years years and still nothing !!!!
I have waited until now and I understand that this will probably never happen either
Just nasty!!!!!!

@Itay1787 Yes, dear user, we are still developing ONLYOFFICE and you can monitor our activity at https://github.com/ONLYOFFICE.
As I mentioned earlier RTL is not a high priority task, but you can contact [email protected] to change that.

what excuse do you have to tell us that you do not yet have RTL support

We have no excuses, except we are open source project and you can implement whatever you want by yourself.

if we contact sales, can we have a quotation for RTL support ?

@cpot Not sure what do you mean by quotation for RTL support

to get an estimated price (an if possible a target date) from you to implement RTL.

@cpot just contact [email protected] and you will get all information about implementation RTL from our sales team

Software without RTL support in 2019, nice. Will buy Office 365 better

For whom it may concern,

Plus Arabic & Hebrew, here are many other languages:

Image

states using the Arabic alphabet to write one or more official national languages, including Azerbaijani, Baluchi, Brahui, Persian, Pashto, Central Kurdish, Urdu, Sindhi, Kashmiri, Punjabi and Uyghur.

More in this link

All are RTL and use Arabic letters and needs Bidi support or letter joining AFAIK not only RTL.

The total population of these langs exceeds 1B people will be out of your targeted users with these 2 missing features and letter joining is more important than RTL by far.

Regards,

+1

Are there any new news?

It seems that the only way RTL will be implemented is if we as users implement it. Time to break out the code editors?

It seems that the only way RTL will be implemented is if we as users implement it. Time to break out the code editors?

If you know
So please!!!!

please add RTL Support, persian. arabic.

@ShockwaveNN @K0R0L

We were able to do the heavy-lifting to implement ligatures and character positioning for Arabic. It wasn't easy. The code is very well-written, but comments are few (and my guess is documented elsewhere). We are still struggling with the Recalculate functions in case an Arabic ParaRun straddles 2 lines

We are prepared to advance this function and PR it to the repo. But we need some help to advance things, otherwise will take us forever (we need to fully understand the code, and then implement exceptions for RTL)

Can we have a video conference? Not more than 30 mins for us to get advice and a mental map and we are well on our way. (You can PM / email me)

image

@ramezrafla Sorry, I'm just a QA guy, I have no knowledge of render code, so it's up to @K0R0L

Thanks, @K0R0L would love to get your response please
Thanks

@ramezrafla Good job done ramez, would you plz make a PR to the development branch so we can all test and contribute.

BTW is this implementation a general one that works with all editors or just for word app ?

@mohamedhagag
Thanks for the kind words. It took a lot of work to get here and the people from ONLYOFFICE are REFUSING to help! @K0R0L hasn't replied or delegated. They want us to pay them $100k to get them to do it. We don't even have a proper dev setup so iterations take a long time. So we can't PR against dev branch, but against master (given they don't document their development changes and roadmap so we can't take a risk with dev)

First, at this point, we only have ligatures at the word-level working for Word (which is reused by Slide), not yet in the sheets engine.
Secondly, you will notice that the last sentence in the first line of the image I attached before is not properly broken up. Given we still use LTR rendering but rework the content so it is renderable RTL. That still needs to be fixed.
Thirdly, we still don't have editing done. This is more complex, as you have to recompute the position of cursor additions and rerender the display while keeping the underlying content correct so it gets saved (you also have to move the cursor the other way as people type)

We are not done yet, unfortunately. So please be patient with us. We can't PR a half-baked product (not even half!). You can see the work in this fork https://github.com/ramezrafla/sdkjs branch ar-flow

$100k can make project better then OnlyOffice

I wonder is RTL ever going to be supported in ONLYOFFICE ??

We are quite advanced, but it keeps breaking with new updates. It's like a stress test until it will finally work.

Here is the problem. The renderers use HTML5 Canvas elements. That means it literally paints the characters one after the other. A technical feat for sure. When dealing with Arabic you have a number of problems

  1. First, it renders LTR. There is no way we are going to rewrite the whole code to support RTL. So we cheat. We compute a display stack that is rendered LTR but looks correct RTL.
  2. Second, is ligatures. Characters change based on their position in the word. We got that fixed. But again, required having two stacks. A content stack and a display stack
  3. Third, words in a paragraph. You have to compute each line when rendering the display stack, you can't just inverse the order. This part is tricky.

Where things start to break is when you select a character, or move your cursor past the end of line (it needs to wrap around properly for Arabic) etc.

This requires solid experienced JS developers to help us. If there are volunteers, reach out pls. And by experienced, I also mean people who can read the code of others that is undocumented. You get sometimes names like Split and Split2 and you have no idea which is which.

@ramezrafla we appreciate your hard work and the effort you're putting in bringing the RTL support to ONLYOFFICE.

I'm no solid experienced JS developer, otherwise I wouldn't hesitate helping you. If there is anything else I can do please let me know.

Wish one day, that we as RTL language writers can actually use ONLYOFFICE.

It’s been pending for 4 years, which I think we can agree is unacceptable at this point. All other major word processors (LibreOffice Writer, Microsoft Word, Pages, Google Docs, etc.) have this feature.

Not to mention, the same roadmap you mentioned earlier doesn’t mention any support for RTL. Has it really been added, as you said?

More than 1.7 billion people all around the world speak RTL languages, which is 23% of the global population.

This issue is 4 years old. Nice! Looks like LibreOffice is the only office suite on Linux that supports RTL properly.

@Ahmed-E-86 they want us to pay them $100k to support it

@Ahmed-E-86 they want us to pay them $100k to support it

They just put more obstacles for their support. You know what, LibreOffice has full support for RTL, they just need more work to fully support Microsoft Office formats Like doc, and docx

This issue is 4 years old. Nice! Looks like LibreOffice is the only office suite on Linux that supports RTL properly.

Softmaker office supports RTL pretty well too, and it also works very well with docx, pptx, and xlsx.

This issue is 4 years old. Nice! Looks like LibreOffice is the only office suite on Linux that supports RTL properly.

Softmaker office supports RTL pretty well too, and it also works very well with docx, pptx, and xlsx.

No, I tried Softmaker Office, and some documents are either empty, or the formats are messed up.

This issue is 4 years old. Nice! Looks like LibreOffice is the only office suite on Linux that supports RTL properly.

Softmaker office supports RTL pretty well too, and it also works very well with docx, pptx, and xlsx.

No, I tried Softmaker Office, and some documents are either empty, or the formats are messed up.

That's weird, maybe worth playing with local configurations, I use it in a windows only work environment and it works near flawlessly.

Its a real shame that this issue has not been resolved for so long; and very frustrating. Our organization has started playing with nextcloud. There was not trouble installing and getting the community version installed and working. But our clients type in Hebrew. But typing Hebrew Left to Right kinda doesn't work for them.

If you guys really want to be as compatible as possible with Microsoft Office you are going to have to support Right to Left. In the meantime, I guess I will have to see what I can do to get Collabora installed

this is a horrible way to do things and needs to be replaced with something else, let me know what i can do to help
i would not use this software otherwise, which is a shame because it looks like there is a very good UX team behind the whole project and generally everything about the software seems well thought out

I definitely volunteer.

We are quite advanced, but it keeps breaking with new updates. It's like a stress test until it will finally work.

Here is the problem. The renderers use HTML5 Canvas elements. That means it literally paints the characters one after the other. A technical feat for sure. When dealing with Arabic you have a number of problems

  1. First, it renders LTR. There is no way we are going to rewrite the whole code to support RTL. So we cheat. We compute a display stack that is rendered LTR but looks correct RTL.
  2. Second, is ligatures. Characters change based on their position in the word. We got that fixed. But again, required having two stacks. A content stack and a display stack
  3. Third, words in a paragraph. You have to compute each line when rendering the display stack, you can't just inverse the order. This part is tricky.

Where things start to break is when you select a character, or move your cursor past the end of line (it needs to wrap around properly for Arabic) etc.

This requires solid experienced JS developers to help us. If there are volunteers, reach out pls. And by experienced, I also mean people who can read the code of others that is undocumented. You get sometimes names like Split and Split2 and you have no idea which is which.

It is weird that it seems there is no real intention of solving this very important issue!

It is weird that it seems there is no real intention of solving this very important issue!

that is why I have abandoned this project in favor of libreoffice

Weird!!

image

its been 4 years, there is no way you couldn't have fixed it.

an awesome project with a major issue.
that haven't been fixed for 4 years.

its been 4 years, there is no way you couldn't have fixed it.

an awesome project with a major issue.
that haven't been fixed for 4 years.

+1

They're ignoring this issue like it's not there at all or it's not that important 😔...

I really love ONLYOFFICE.
However, I do need RTL support to be able to read and write documents containing Hebrew...
Any action in this direction will be welcomed.

We are not done yet, unfortunately. So please be patient with us. We can't PR a half-baked product (not even half!). You can see the work in this fork https://github.com/ramezrafla/sdkjs branch ar-flow

Thank you @ramezrafla for your hard work. I do understand how hard it is to implement that. Your fork has disappeared, so, is this still under progress somehow?

It shame on onlyoffice! please go to collabora online : https://www.collaboraoffice.com/code/
don't wait from onlyoffice, they will not add RTL. Imagine 4 years people are trying to do effort for help, but onlyoffice need money.

its been 4 years, there is no way you couldn't have fixed it.

an awesome project with a major issue.
that haven't been fixed for 4 years.

+1

Was this page helpful?
0 / 5 - 0 ratings