Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Text align with Multi Languages(Urdu/English)

Hi everyone,

I create a script in two languages (Urdu/English),
how to text-align with the selected language.
like if select Urdu then question responses starting from the right side and if select English then question responses starting from the left side.

thanks in advance.

asked Apr 17 by Ali Raza Bronze (800 points)
The general rule for right-to-left display is to set the CSS "direction" to "rtl."  It's easy enough to apply this everywhere, but it sounds like you want this applied conditionally.  How do you tell which way you need to display the page for each respondent?  A select question about language at the start of the survey perhaps?
I also add a select question about language at the start of the survey, if the respondent select English but language not starting right side.
Try adding this to your survey header:

[% Begin Unverified Perl
if (GETVALUE('SelectQ') == 1) {
    return '<style>body {direction: rtl;}</style>';
End Unverified %]

"SelectQ" must be replaced with the name of the language select question.  "1" must be replaced with which response option relates to Urdu.

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.