<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I have given some thought to how to handle/display domain names that are in a right to left script such as Arabic. After some thought and experimentation I think that each label of a domain name should be bidi isolated.
<div class=""><br class="">
</div>
<div class="">Lets take a 2 level domain name: 2ndLevelD.TLD where each label is written in a Right to Left Script.</div>
<div class=""><br class="">
</div>
<div class="">In a Left to Right paragraph/document I want the ordering to be 2ndLevelD.TLD</div>
<div class=""><br class="">
</div>
<div class="">In a Right to Left paragraph/document I want the ordering to be TLD.2ndLevelD</div>
<div class=""><br class="">
</div>
<div class="">Using bidi isolation this can be achieved. In the case of html5 one can use the bidi isolate tag &lt;bdi&gt;</div>
<div class=""><br class="">
</div>
<div class="">So, I now write my domain name in html5 as</div>
<div class=""><br class="">
</div>
<div class="">&lt;bdi&gt;2ndLevelD&lt;/bdi&gt;.&lt;bdi&gt;TLD&lt;/bdi&gt;</div>
<div class=""><br class="">
</div>
<div class="">I then experimented with the html dir attribute and flipped the whole document between dir=&quot;ltr&quot; and dir=&quot;rtl&quot; and it gave me the results I wanted as above.</div>
<div class=""><br class="">
</div>
<div class="">I need to think a bit more about the possible permutations of the local part of an email address but if it is a single word then the following works</div>
<div class=""><br class="">
</div>
<div class="">eg</div>
<div class=""><br class="">
</div>
<div class="">&lt;bdi&gt;email&lt;/bdi&gt;@&lt;bdi&gt;2ndLevelD&lt;/bdi&gt;.&lt;bdi&gt;TLD&lt;/bdi&gt;</div>
<div class=""><br class="">
</div>
<div class="">I believe that using bidi isolates leads to easier to comprehend domain names/email addresses for both Left to Right readers and Right to Left readers.</div>
<div class=""><br class="">
</div>
<div class="">So, for example, a Left to Right reader would see a domain name 2ndLevelD.TLD and one can easily comprehend the ordering is from minor to major from Left to Right. The text in each label is though Right to Left</div>
<div class="">
<div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
AndrĂ© Schappo</div>
</div>
<br class="">
</div>
</body>
</html>