Reputation: 1045
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
Reputation: 1
app = (MyApplication)getApplicationContext();
lang = Actions.setLocal(this);
using the function:
functionUpvotes: 0
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
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
Reputation: 1506
Also you may need to use 'onConfigChange' to your 'AndroidManifest' file with option 'locale'
Upvotes: 0