Arabic and latin characters get mixed up

I am currently doing the technical part of creating an Arabic version of our website. The other languages should not be affected by this, so basically the changes to the markup must be minimal.

What I have (in English):

<div class="location_description"> <span itemscope itemtype="http://schema.org/AdministrativeArea">
<span class="glyph featcl_T"></span>
<span itemprop="name">Canton of Obwalden</span>,</span>
<span class="coords" itemprop="geo" itemtype="http://schema.org/GeoCoordinates">46.77°N 8.43°E 3238m asl
    <meta itemprop="elevation" content="3238">
    <a target="_blank" title="Geonames" href="http://www.geonames.org/2658357"><span class="glyph edit">
</span>
    </a>
    <meta itemprop="latitude" content="46.77">
    <meta itemprop="longitude" content="8.43">
    </span>
</div>

"Canton of Obwalden" comes from a database, and can be Arabic too, but can also be in any other language. Our translator did the translations for "N", "E" and "m asl", and the result is a total mess... http://jsfiddle.net/stby04/xzj5czb5/

So, how do I bring that in the correct order for every possible combination of languages?

Answers


add dir="rtl" in every tag in which you expect to have Right to Left Text

div class="arabic">
    <div class="location_description"> <span dir="rtl" itemscope="" itemtype="http://schema.org/AdministrativeArea">

                            <span dir="rtl" class="glyph featcl_T"></span>
 <span dir="rtl" class="arabic" itemprop="name">Kanton Obwalden</span>,</span> <span class="arabic" itemprop="geo" itemscope="" itemtype="http://schema.org/GeoCoordinates">46.77°ش 8.43°ق 3238متر فوق سطح البحر<meta itemprop="elevation" content="3238"><a target="_blank" title="Geonames" href="http://www.geonames.org/2658357"><span class="glyph edit"></span>
        </a>
        <meta itemprop="latitude" content="46.77">
        <meta itemprop="longitude" content="8.43">
        </span>
    </div>
</div>

Need Your Help

Loop in php script from cron?

php wordpress bash cron

I have a wordpress php script running as a cron job. it's currently running once a minute per domain indefinitely.

Titanium Alloy - Animating window on Android

javascript android animation titanium

I'm fairly new to Titanium Alloy, last 2 weeks i've been digging in the docs &amp; Q/A to figure out how to animate open a window but none of the solutions work for me or just partly.