View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
03968Bug reportsStatisticspublic2009-12-31 00:52
Reporteruser4084Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.85+ 
Fixed in Version1.87 
Summary03968: Arabic Support in Grpahs Legend
Description

The Problem is in legend drawing in piechart, instead of arabic chars only squares appears, after changing the font, the characters display correctly but not continuous which is how arabic is written

Additional Information

Solution:

patching the limesurvey with files from an open source arabic php project
at : http://www.ar-php.org/en_index_php_arabic.html

add the Arabic package to limesurvey

file: admin/statistics.php
line: 4249
code:

//kabapy : arabic support
// prepare unicode text if not english
$lblout=$lbl; //reset text order to original
include_once('Arabic.php');
$Arabic = new Arabic('ArGlyphs');
foreach($lblout as $kkey => $kval){
if (preg_match("^[A-Za-z]^", $kval)) { //auto detect if english
//eng
//no reversing
}
else{
$kval = $Arabic->utf8Glyphs($kval,50,false);
$lblout[$kkey] = $kval;
}
}

TagsNo tags attached.
Attached Files
TestSurvey.rar (73,590 bytes)
Bug heat6
Complete LimeSurvey version number (& build)1.85
I will donate to the project if issue is resolved
BrowserALL
Database type & versionXAMPP Windows 1.70
Server OS (if known)Windows 7 7600 Ultimate
Webserver software & version (if known)APACHE
PHP VersionPHP Version 5.2.8

Relationships

related to 03967 closedc_schmitz Native Languages support in csv file export and import 

Users monitoring this issue

There are no users monitoring this issue.

Activities

user372

2009-12-07 23:10

  ~10510

@ kabapy:
1) It seems that you have coding knowledge ==> is this correct?
2) In the current development branch we implemented many fixes for RTL languages ==> please don't use (or provide patches) for v1.85+ or v1.86 ==> have a look at the current development branch ==> see:
http://docs.limesurvey.org/tiki-index.php?page=Accessing+the+Source+Code
and do a check out of the following directory ("limesurvey" directory is the lastest dev version and NOT "limesurvey_dev"):
https://limesurvey.svn.sourceforge.net/svnroot/limesurvey/source/limesurvey
3) we are looking for someone, who uses LimeSurvey in an RTL languages and provides feedback, translations, reports bugs,... ==> are you interested?

user4084

2009-12-07 23:24

  ~10511

thanks a lot for your suggestion , actually i am more of an ASP.NET Guy, but i will be happy to participate in the lime survey development regards RTL languages

i am actually stuck with v 1.85+ because i made numerous customizations for the survey system for a project i am working on. starting with newer version is not preferable right now

i will take a look in the SVN and i will see what can i do

Thanks again for allowing me to share my work around.

final thought for version 2.00 , please make it more modular with a base and plugin interface . that would be great

c_schmitz

c_schmitz

2009-12-08 13:43

administrator   ~10516

Last edited: 2009-12-08 13:43

kabapy, can you attach an very short Arabic survey and screenshots (before/after) to demonstrate the problem in the graphs?
Thank you!

c_schmitz

c_schmitz

2009-12-11 10:49

administrator   ~10538

Pretty please?

user4084

2009-12-12 05:17

  ~10548

Last edited: 2009-12-12 05:21

Sorry for being late, i was pretty busy with a project

i used a test survey in lime survey Version 1.86 (7697)
xampp version 1.7

i traced the problem by trying a small survey:

1- i used a survey "test 1" with English as base language and arabic as a second language

in statistics the graph shows only the english info there is no way i could find to display the arabic text on the graph

When forcing the issue by using arabic text in both pages arabic and english the graph shows squares instead of arabic characters
( see file "bad arabic 1.png")

2- i used a survey "test 2" with arabic as a base language and English as a second language

in statistics the graph shows arabic letters but not conncected
(see file "bad arabic 2.jpg" , you can see in the screen shot how it should be displayed above the graph)


there is still the issue of alignment in the survey templates, there are alot of inherited "text-align : left;" in the css that blocks HTML RTL

attached the pictures and the 2 test surveys as csv files in the rar file

thanks for your interest, i am ready to answer any question you may have

user372

2009-12-12 17:15

  ~10554

@ kabapy: We released LimeSurvey v1.87RC5, which contains a lot of fixes for RTL languages ==> please download this version and tell us, which errors are still open - Thx:

Download LimeSurvey v1.87RC5:
http://sourceforge.net/projects/limesurvey/files/2._LimeSurvey_unstable/1.87RC/limesurvey187RC5-build8159-20091211.zip/download

user4084

2009-12-14 09:47

  ~10564

still the same, in both test surveys

i know that my solution is very specific to my project and my language

i suggest a smarter detection of characters using regular expressions
e.g arabic chars in unicode ranges from 0X0600 to 0X06FF
see http://unicode.org/charts/PDF/U0600.pdf

hope that helps

c_schmitz

c_schmitz

2009-12-19 00:01

administrator   ~10605

Thank you very much. Will be fixed in th next version.

Issue History

Date Modified Username Field Change
2009-12-07 22:36 user4084 New Issue
2009-12-07 22:36 user4084 Status new => assigned
2009-12-07 22:36 user4084 Assigned To => user372
2009-12-07 22:36 user4084 LimeSurvey build number => 1.85
2009-12-07 22:36 user4084 Browser => ALL
2009-12-07 22:36 user4084 Database & DB-Version => XAMPP Windows 1.70
2009-12-07 22:36 user4084 Operating System (Server) => Windows 7 7600 Ultimate
2009-12-07 22:36 user4084 Webserver => APACHE
2009-12-07 22:36 user4084 PHP Version => PHP Version 5.2.8
2009-12-07 22:40 c_schmitz Assigned To user372 => c_schmitz
2009-12-07 23:10 user372 Note Added: 10510
2009-12-07 23:10 user372 Relationship added related to 03967
2009-12-07 23:24 user4084 Note Added: 10511
2009-12-08 13:43 c_schmitz Note Added: 10516
2009-12-08 13:43 c_schmitz Note Edited: 10516
2009-12-08 13:43 c_schmitz Status assigned => feedback
2009-12-11 10:49 c_schmitz Note Added: 10538
2009-12-12 05:17 user4084 Note Added: 10548
2009-12-12 05:17 user4084 File Added: TestSurvey.rar
2009-12-12 05:20 user4084 Note Edited: 10548
2009-12-12 05:21 user4084 Note Edited: 10548
2009-12-12 17:15 user372 Note Added: 10554
2009-12-14 09:47 user4084 Note Added: 10564
2009-12-19 00:01 c_schmitz Note Added: 10605
2009-12-19 00:01 c_schmitz Status feedback => resolved
2009-12-19 00:01 c_schmitz Fixed in Version => 1.87
2009-12-19 00:01 c_schmitz Resolution open => fixed
2009-12-31 00:52 c_schmitz Status resolved => closed