phpcsswordpressqtranslate

div inside <!--:ar--> qtranslate tag


I have a multilingual website (English, Arabic, and French).

I have the following code:

<?php _e('<!--:ar-->للحصول على إجابة سريعة، نرحب بمكالماتكم / و
 رسائلكم عبر البريد الإلكتروني.<!--:--><!--:en-->For A Quick Answer, We Welcome Your
 Calls / Emails.<!--:--><!--:fr-->Pour Une Réponse Rapide, Nous Attendons Vos Appels
 / E-mails.<!--:-->'); ?>

I want to custom style the Arabic part of this echo so I am trying to add a div inside the Arabic part as follows:

<?php _e('<div class="note"><!--:ar-->للحصول على إجابة سريعة، نرحب
        بمكالماتكم / و رسائلكم عبر البريد الإلكتروني 
        .<div><!--:--><!--:en-->For A Quick Answer, We Welcome Your Calls / Emails.
        <!--:--><!--:fr-->Pour Une Réponse Rapide, Nous Attendons Vos Appels /
        E-mails.<!--:-->'); ?>

However, it is affecting the English and french parts too even though i am closing the div before that the english section starts.

please help


Solution

  • I fixed it by using inline css instead of naming a class for the div. So the following code worked fine for me:

    <div class="note"><?php _e('<!--:ar--><div style="direction:rtl;">للحصول على إجابة سريعة، نرحب بمكالماتكم / و رسائلكم عبر البريد الإلكتروني.</div><!--:--><!--:en-->For A Quick Answer, We Welcome Your Calls / Emails.<!--:--><!--:fr-->Pour Une Réponse Rapide, Nous Attendons Vos Appels / E-mails.<!--:-->'); ?></div>
    

    the weird thing is that if I use class for the div and then edit the class in an external css then it will affect all languages.