GMail Align to Right Right-To-Left Scripts (languages)

Last update on Apr 18, 2006

Aligns to the right those messages with Right-To-Left written scripts (Such as Hebrew, Arabic, Syriac or Thaana)

This script will check to see if the messages have Hebrew, Arabic Syriac or Thaana words in them, and aligns them to the right. Adding more languages is really easy... Just ask me and I'll do it!
For every aligned message there is a - Align this message to Left - line, so you can click on it to undo the script's doing if something went wrong (like when someone sends you a whole message with English, but only a word or two in that other language)

Version history

Version 0.1 - April 19, 2006
  • First release

Disclaimer

This script is a bit broken - some messages won't align, some will align and refuse to un-align if you tell it to... I don't have much time to fix this script, and hacking a userscript to GMail was hard enough in the first place... maybe some day I'll fix it, but I can make no promises :) If anyone else would like to fix it, I'd be glad to help as much as I can

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License.



You could comment on this script if you were logged in.

10 comments Feed-icon

1 point
login to vote
daniel Rozen... script's author
Posted 5 hours ago

Tomer, this isn't what the script is supposed to do. What it does is to re-align messages you RECIEVE, not messages you write. In case someones writes a message mixed with hebrew and english, it aligns the message to the right so you can read it without moving your eyes back and forth.

However, the script stopped working in the new GMail version. I promise to look into it and try my best to upload a new version that will do the job.

1 point
login to vote
Posted Sep 11, 2008

Google recently added RTL controls for all the languages. You can enable that buttons from the Settings screen. Therefore, this script is no longer necessary.

1 point
login to vote
Itai345 user
Posted Aug 2, 2007

This is really useful for me! Thanks very much!

I would add the following to the list of sites:

      https://mail.google.com/a/*
      http://mail.google.com/a/*
      

This would make it work for the "Google Apps" version of Gmail.

Thanks!

1 point
login to vote
splintor scriptwright
Posted Jun 18, 2007

Dawudd (and all others): I created a Gmail RTL user script. Enjoy.

1 point
login to vote
Dawudd user
Posted Apr 8, 2007

It would be much better if someone were able to convert the small ‘Gmail RTL’ extension into a script. Alas, I have been unable to do so, so far.

1 point
login to vote
amir 2 user
Posted Jan 28, 2007

Very good, with one problem.
If you choose Hebrew as your preferred language, you get your English mails aligned to the right.
This script could easily be extended to support this.
Just add the following lines just after line 81:

else{
node.style.direction = 'LTR';
var existingDirectionChanger = node.previousSibling;
if (existingDirectionChanger) {
existingDirectionChanger.parentNode.removeChild(existingDirectionChanger);
}
addDirectionChanger(node, false);
}

1 point
login to vote
Lior D, user
Posted Sep 19, 2006

The script is broken. Some emails don't align automatically nor manually. In others only the attachments are aligned. I'd fix it, if I knew how.

1 point
login to vote
daniel Rozen... script's author
Posted Aug 1, 2006

Lior Z., it's not obsolete yet - you can still recieve messages in hebrew that have a Left-To-Right directionality, whereas this script will change this directionality to the opposite... I doubt google will implement this any time soon... I'll be shocked if they do :)

1 point
login to vote
Lior Zur scriptwright
Posted Jul 7, 2006

Hi, just took a look at your script. It seems like a great achievement -- very nice code. Thanks. The code is well documented too. But, recently Gmail added its own support for Hebrew; doesn't it make the script obsolete?

1 point
login to vote
Alon user
Posted Apr 24, 2006

Thanks, works great.

You could comment on this script if you were logged in.