Translate android app a and make it force RTL

353 views Asked by At

I'm new to android and i want to translate an app. to arabic and force RTL direction. If anyone can help please.

Thank you

1

There are 1 answers

0
kavita On

If you want to support Arabic for your app, follow the below steps :

1) Create resource file (res/values-ar/strings.xml) and put your content.

2) Mostly supportsRTl set as true. Check once in Manifest file.

Example:Creating Arabic resource file

  <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

3) Test it in your device by doing below settings changes :

  • Select locale(Arabic) in language option
  • "Force RTL layout direction" in Developer option.

Note : Developer option will be enabled once you select build number 7 times. (inside Settings/ About Phone)

You can find simple example in below link: https://www.tutorialspoint.com/android/android_localization.htm