[LON-CAPA-users] Full support for Right-To-Left languages?

Mills, Douglas G dmills at illinois.edu
Wed Jun 6 11:28:29 EDT 2018

Don't know how far this helps, but a quick test shows that wrapping the content of your problem in a div with an id of "problemwrapper" and adding the following style moves the text field to the left end of the prompt.  Text-entry in the text field is still left to right so there are still more issues to be addressed, but perhaps this gives a step forward?  I have not tried anything with your second example.

<style type="text/css">
#problemwrapper input[type="text"]{float:left;margin-right:20px;}


Douglas Mills
Director of Instructional Technology
Department of Chemistry
University of Illinois

From: LON-CAPA-users <lon-capa-users-bounces at mail.lon-capa.org> on behalf of Itay <itayf at nospammail.net>
Reply-To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Date: Tuesday, June 5, 2018 at 8:35 AM
To: Discussion list for LON-CAPA users <lon-capa-users at mail.lon-capa.org>
Cc: Yair Naveh <yairv at jce.ac.il>
Subject: [LON-CAPA-users] Full support for Right-To-Left languages?


We are interested in developing content in Hebrew which is a Right-to-left (RTL) language.

We have authored several test problems in order to see the extent of RTL support.

To achieve correct directionality of the text within sentences we have used the <span> tags with the RTL attribute.

However, this does not provide good support for RTL alignment of paragraphs.

For example, in a radiobutton response, the radio buttons appear on the wrong side, see minimal example below.

We haven’t found in the manuals any instructions for authoring content in RTL languages.

We wonder if full RTL support is available for Lon-Capa content and interface (including menus, etc.).

If such support is not available built-in, we would appreciate any information as regard to implementing such support.

Minimal examples follow below.
(Note: this message was sent to the developers' list but did not receive any response.  So we try our luck here.)
Thank you in advance.

Itay Furman & Yair Naveh
Jerusalem College of Engineering, Israel

  <!-- Test full RTL support : demonstrate wrong placement of submission field. -->
  <script type="loncapa/perl">
    $a=&random(1,10,1);  $b=&random(1,10,1);  $c=$a+$b;
  <startouttext />
    <span dir="rtl">חשבו: כמה זה $a + $b?</span>
  <endouttext />
  <numericalresponse answer="$c">
    <textline />

  <!-- Test full RTL support :
       demonstrate wrong placement of radiobuttions, and wrong alignment of margins. -->
  <span dir="rtl">
    <startouttext />
    כמה זה 1+1?
    <endouttext />
    <radiobuttonresponse max="10" randomize="yes">
      <foil location="random" value="true" name="foil1">
        <startouttext />2 (זוהי תשובה נכונה).<endouttext />
      <foil location="random" value="false" name="foil2">
        <startouttext />4 (זוהי תשובה שקרית).<endouttext />
      <foil location="random" value="false" name="foil3">
        <startouttext />5.5 (זוהי תשובה שקרית).<endouttext />

  <!-- Test full RTL support : demonstrates correct mixture of RTL and LTR pieces. -->
  <startouttext />
  <span dir="rtl">
    לפני המשוואה  <!-- This text precedes the equation (on the right). -->
    <m>\(c = a + b \)</m>
    אחרי המשוואה. <!-- This text follows the equation (on the left). -->
    <br />
    לפני האנגלית, <!-- This text precedes the english text. -->
    english text between hebrew text,
    אחרי האנגלית. <!-- This text follows the english text. -->
  <endouttext />

Done minimal examples.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.lon-capa.org/pipermail/lon-capa-users/attachments/20180606/263c2740/attachment-0001.html>

More information about the LON-CAPA-users mailing list