Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably a good place to ask: I want to add an arabic translation to a webpage I operate. My text editor is a bit confused by the unicode symbols. Obviously the text editor displays left-to-right no matter what as it's made for programming.

What's the right way to handle this?



This might provide some insight for setting up your editor [1]. W3C has guidelines for localization [2] and for using RTL script online [3].

[1] http://andreasmhallberg.github.io/typing-arabic-in-vim/

[2] https://www.w3.org/International/questions/qa-html-language-...

[3] https://www.w3.org/International/questions/qa-html-dir


If the editor only has trouble displaying Arabic and does not somehow mess with the unicode representation then you should be fine. Ie you could paste an Arabic string into a JSON file, it might look like shit, but should still render correctly in your app or website (assuming you set the text direction or language properties right)

And you can always double check in a different editor to be sure nothing gets messed up. I use VS Code which, likely because its browser based, seems to get it right as well.


I recommend using gedit for this use case (available for linux and mac) it has the best support for arabic, right to left script and bidi (that's mixing rtl and ltr in the same sentence) I've ever seen


Kate (KDE's editor) is also fine.


also I would be happy to help you support arabic in your webpage. send me an email slim@pirate.tn




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: