Click here to Skip to main content
13,091,145 members (51,422 online)
Rate this:
Please Sign up or sign in to vote.
See more:
send email in arabic that contain english words will be difficult to read because of the no alignment of the body
how can i make a right to left alignment that will display the english word in the correct place of the body??
Posted 25-Nov-12 23:00pm
Updated 26-Nov-12 1:02am
Sergey Alexandrovich Kryukov 26-Nov-12 11:42am
How is that related to C#? Mail is mail...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can freely mix Arabic text with English or any other languages of left-to-right flow direction. This direction actually has nothing to do with alignment.

The only problem is editing such texts, because the actual behavior of text caret depends on the character repertoire of the neighboring characters. Even though it almost drove me crazy, in all cases I managed to type required text (anyway, please don't talk to me in Arabic: unfortunately, I cannot understand the language itself, I remember only very few words — I did it only for testing some software :-)).

If you still have any concerns about alignment, you should understand that it has nothing specific to e-mail. Rather, it depends on the content type. Basically, you have a choice from the content type "text/plain" or "text/HTML". In case of plain text, there is nothing like real alignment. Just try to mix the right-to-left and left-to-right text and see how it looks: to me, quite readable and even editable. With HTML, you can control alignment with CSS. When specifying content type, don't forget to specify encoding. Most typically, it should be UTF-8; and this is most advisable, too: "text/plain; charset=utf-8" or "text/html; charset=utf-8".

Of course, you always can write multi-part e-mail message, then each part can have its own content type.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100