5,603,591 Members 35,753 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Arabic + RTL reading/writing for the SGS2

Tip us?
 
madmack
Old
(Last edited by madmack; 29th August 2011 at 01:46 PM.)
#1  
madmack's Avatar
Senior Member - OP
Thanks Meter 4282
Posts: 3,480
Join Date: Dec 2008
Location: Boston, MA

 
DONATE TO ME
Post [MOD] Arabic + RTL reading/writing for the SGS2


RTL - Right to left support.


I have recompiled the webkit files for our SGS2 to support arabic shaping. This thread will serve to help you folks arabize (shaping arabic texts) any deodexed rom out there (well, except MIUI based ones).

Framework.jar (and libwebcore.so):
patching framework.jar will give you arabic shaping + RTL support everywhere except the browser and gmail, while patching libwebcore.so will give you RTL + arabic shaping support in the Browser + Gmail apps.

Please go to my website for instructions and detailed howto: (Scroll down for English)
http://blog.devasque.com/?page_id=11

note1: V0.810 will attempt to give you RTL + Arabic shaping in the Browser as well. Please follow the new guidelines at the blog. (using brightidea's work)

note2: On our Samsung Galaxy S2 device, arabic letters might come garbled at some locations. For that, you need to replace a font which is listed below.

libwebcore.so
Note: if you used v0.810 for my universal patcher, replacing libwebcore.so from this section manually may be unnecessary as the universal patcher attempts to arabize this file as well. (make sure you follow the new guidelines in the blog)

This file is responsible for shaping arabic texts in the Browser and Gmail apps. Just replace the file in /system/lib with this one and you should get arabic shaping out of the box. You'll need root to change this file.

Gingerbread 2.3.3 (CWM Flashable):
http://www.multiupload.com/E2URI45F1I

Gingerbread 2.3.4 (CWM Flashable): Files created by brightidea. Thank you
This does NOT work on KG1 ROMs
http://www.multiupload.com/FEMKZ90OYS

I highly recommend trying the solution by brightidea in this sister thread for all other devices and ROM versions.

Font
This file is required for our phone. Not using it will give you spacing issues when displaying arabic text.
Note that you can't use any arabic font on the galaxy s2. This will most definitely crash your browser+gmail app. Use only stock samsung fonts or this one (my own ):
Place the file in /system/fonts/ and reboot.
http://www.multiupload.com/3XRONTS8BM



update: some screenies


Attached Thumbnails
Click image for larger version

Name:	RTL.jpg
Views:	14667
Size:	33.8 KB
ID:	703730  
The Following 70 Users Say Thank You to madmack For This Useful Post: [ Click to Expand ]
 
medo159
Old
#2  
Senior Member
Thanks Meter 27
Posts: 118
Join Date: Dec 2006
downloading and testing, will post back the result

Thanks a lot mate, that was quick
 
madmack
Old
#3  
madmack's Avatar
Senior Member - OP
Thanks Meter 4282
Posts: 3,480
Join Date: Dec 2008
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by medo159 View Post
downloading and testing, will post back the result

Thanks a lot mate, that was quick
sure thing. lemme know how it goes.

if you're getting camera FCs with my deodexed files, can you post a logcat here ?
The Following 3 Users Say Thank You to madmack For This Useful Post: [ Click to Expand ]
 
medo159
Old
#4  
Senior Member
Thanks Meter 27
Posts: 118
Join Date: Dec 2006
well, I tried to replace the file but I couldn't (using Astro and Rootexplorer) they all says "the phone is not rooted".

How am I supposed to replace that "System File" !?
 
madmack
Old
#5  
madmack's Avatar
Senior Member - OP
Thanks Meter 4282
Posts: 3,480
Join Date: Dec 2008
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by medo159 View Post
well, I tried to replace the file but I couldn't (using Astro and Rootexplorer) they all says "the phone is not rooted".

How am I supposed to replace that "System File" !?
root is most definitely required to do any of that stuff. (i also mentioned it in the first post )

there is a thread by ChainFire that tells you how to root your SGS2
The Following User Says Thank You to madmack For This Useful Post: [ Click to Expand ]
 
ams84
Old
#6  
ams84's Avatar
Senior Member
Thanks Meter 52
Posts: 246
Join Date: Apr 2010
Location: Home

 
DONATE TO ME
will Android 2.4 support arabic!??
 
madmack
Old
#7  
madmack's Avatar
Senior Member - OP
Thanks Meter 4282
Posts: 3,480
Join Date: Dec 2008
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by ams84 View Post
will Android 2.4 support arabic!??
i don't know
The Following User Says Thank You to madmack For This Useful Post: [ Click to Expand ]
 
ragiut1
Old
#8  
Senior Member
Thanks Meter 45
Posts: 210
Join Date: Nov 2009
thnx for ur work
much appreciated
 
medo159
Old
(Last edited by medo159; 4th May 2011 at 05:22 PM.)
#9  
Senior Member
Thanks Meter 27
Posts: 118
Join Date: Dec 2006
Ok I feel a bit nooby right now :$

Just rooted my phone, Do I need to change the file's permissions?

UPDATE: YES!! I Confirm this method works for me with no problems, the stock browser reads Arabic very well,

It's very important to change the permissions like this





Thanks man, I'm working on that deodex thingy, pls provide any helpful links cause I don't have a clue about it :$
The Following 2 Users Say Thank You to medo159 For This Useful Post: [ Click to Expand ]
 
madmack
Old
#10  
madmack's Avatar
Senior Member - OP
Thanks Meter 4282
Posts: 3,480
Join Date: Dec 2008
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by medo159 View Post
Ok I feel a bit nooby right now :$

Just rooted my phone, Do I need to change the file's permissions?

UPDATE: YES!! I Confirm this method works for me with no problems, the stock browser reads Arabic very well,

It's very important to change the permissions like this





Thanks man, I'm working on that deodex thingy, pls provide any helpful links cause I don't have a clue about it :$
This is awesome !! screenshots ?

I'm glad I got it going without the phone being here with me

For deodexing (its a bit of an advanced topic now, and it seems Camera.apk is force closing, so do it at your own risk).
this is the link :

http://forum.xda-developers.com/showthread.php?t=990238

You already have the deodexed files. just follow the last section in green.

The Following User Says Thank You to madmack For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes