Deepika Lalra
Deepika Lalra

Reputation: 1045

How to provide Arabic Language support in Android Application

I have made an application in android but now I have to provide arabic language support. I have checked many of answers in stackoverflow but from any answer I didn't get correct answer.

Upvotes: 5

Views: 12041

Answers (4)

heba rachid
heba rachid

Reputation: 1

  • In AndroidManifest.xml: SupportRtL this will enable alignments of images and text to right in Arabic and left in English
  • Create two string resource layouts (one English, one Arabic) string Resource
  • Add the same string with the same name in the two layouts but change the value of the arabic string in the (ar\strings.xml)
  • Same goes to each drawable item (Also for reference I'll add how you can create a resource that ar or RL) creating arabic resourse
  • Also either in the base activity to set the base local language
    app = (MyApplication)getApplicationContext();
    lang = Actions.setLocal(this);using the function: function

Upvotes: 0

suresh n
suresh n

Reputation: 345

To provide localization support for different languages, we need to add the language specific resources into separate folder. For eg:Inorder to provide layouts for Arabic language we need to create a separate folder under res folder i.e.,res/layout-ar like this.

In order to access the current language via code we can get the current language by calling

Locale.getDefault().getDisplayLanguage();

for more information look into following links: for localization :http://developer.android.com/guide/topics/resources/localization.html

for RTL layout mirroring (Arabic like languages):http://android-developers.blogspot.de/2013/03/native-rtl-support-in-android-42.html

Upvotes: 3

Salman Mohammed
Salman Mohammed

Reputation: 1

I am just a beginner but I have looked this question up and came up with this: http://marketplace.eclipse.org/content/android-string-localization#.VG5A_PmUeSp Eclipse provides string localization. However, when it translated the strings to Arabic, I had to double check the translation because Arabic has Feminism in Grammar and also some plural forms aren't that correct.

Upvotes: 0

nmxprime
nmxprime

Reputation: 1506

Also you may need to use 'onConfigChange' to your 'AndroidManifest' file with option 'locale'

Upvotes: 0

Related Questions