Saturday, 4 April 2009

Writing In Arabic in Sugar

To get Arabic Language working on OLPC Sugar OS, follow the following steps:
(For more information please refer to this link).

First of all you have to be a root to use 'yum' package manager, so follow these commands:

$ su
# yum update
# yum install fonts-arabic
....
# yum install scim scim-gtk
...
# yum install scim-m17n scim-tables
...
# yum install m17n-db-arabic.noarch

After doing this, you need now to activate scim at the start of Sugar (the interface of XO laptop), to do so you need to copy this file ~olpc/.xsession-example to ~olpc/.xsession and then configuring it to add some line of code as follow:

# cp ~olpc/.xsession-example ~olpc/.xsession
# vi ~olpc/.xsession

Then add the following lines to the file:

export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export USE_XOPENIM=t
scim -d

Now you need to reboot you XO laptop, just type:
# reboot
After booting, Open Browse Activity put the cursor on the text field then hit the HOT KEY for SCIM which is (CTRL+SPACE) a little pop-up window on the right bottom of the screen will show, just change the language to Arabic and start typing, Wohoo, it's writing Arabic characters.

There's one main Problem I am still facing typing in Arabic:
  1. There's some letters don't come in the correct format, for example if you typed "m" Arabic letter followed by "n" Arabic Letter, it won't attach them to each other, instead they will be like separated letters! (See Picture)




This is a good start in Arabizing OLPC. However it still needs a lot of work.

If you have problems in writing Arabic in OLPC, please send us a note we will try our best to help you.

4 comments:

  1. Hi, just noticed this blog and I think that many people in the SugarLabs community will be happy to read it. Would you be interested in being aggregated by http://planet.sugarlabs.org ? If so, please send email to planetmaster@sugarlabs-nospam.org

    ReplyDelete
  2. Hey,
    Yes, Sure. That will be great.
    We have started new, and hopefully this blog will grows soon.

    Thanks I will email you now.

    ReplyDelete
  3. This is also the way to configure Hebrew too.
    Tomeu, any idea why there isn't there a script/configuration option anywhere for it?

    ReplyDelete
  4. Salam,
    we use an easier way to switch into Arabic without using SCIM:
    edit the file as root /etc/sysconfig/keyboard

    KEYTABLE="us"
    XKB_MODEL="olpc"
    XKB_LAYOUT="us,ar"
    XKB_VARIANT="olpc2,olpc"
    restart Xorg (using ctrl+shift+backspace)
    and press the multiplication/devision sign to switch between English and Arabic.

    Greeting from OLPC-Morocco team!

    ReplyDelete