hypothetical: how would you implement bidirectional language support in Sublime text editor, and what features would you like it to have?

StackOverflow https://stackoverflow.com/questions/19219084

Question

Maybe this question is too open-ended and someone will kill it --- however:

I am building systems (web apps and native) requiring multiple language support, including rtl languages like Arabic and Hebrew. Currently I have no need to be able to program in those languages, but writing content is a must.

There are some difficult choices to make I think in the implementation, because I think at some level (I don't know it's why I'm asking) the text file needs to have a consistent direction of string flow, but when we read and compose these files we need to view these elements with their character order reversed in order for them to be sensible.

(Open ended and non-constructive? I'm hoping to construct a solution.)

Était-ce utile?

La solution

I fail to see the connection with SublimeText.

You need RTL support, you use a pre-made component that can handle it. Or start with a library that can help with that support and does the heavy-lifting (for instance Uniscribe, http://msdn.microsoft.com/en-us/library/windows/desktop/dd374091%28v=vs.85%29.aspx, or HarfBuzz, http://www.freedesktop.org/wiki/Software/HarfBuzz/)

Adding it yourself means a lot of work (SublimeText fails miserably at it, I don't even think it tries).

To get an idea what you have to deal with, take a look at the Unicode Bidirectional Algorithm (http://www.unicode.org/reports/tr9/)

Autres conseils

Just vote for adding RTL Languages here...

https://sublimetext.userecho.com/topic/37207-right-to-left-languages-support/

They will add it if the votes reach 600

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top