I read How can I create a multilingual Android application? and Does Android support multiple languages? and I know about creating an Android application with several languages. But my problem is to display texts from right to left and left to right for different languages.
For example, in English TextViewas a label should be on the left of EditText, and in Persian TextViewshould be on the right of EditText.
TextView
EditText
How can I maintain the right to left languages and user interfaces in my user interface?
Should I design different layouts for languages from right to left? How to specify a folder in RTL layouts? something like layout-rtl? Or how can I determine what language is from right to left?
layout-rtl
Is there an easier way?
Official support was introduced in Android 4.2, see RTL format support . You can ask if it will be used by entering the link description here .
In all cases, you can either use the same layout or specify a specific layout in 'layout-ldrtl'.
, RelativeLayout, android: layout_alignParentStart, android: layout_alignParentLeft, .
, , , . :
<string name="english">English</string> <string name="english_fixed" translatable="false">English </string>
R.string.english_fixed , R.string.english . TextViews, .
R.string.english_fixed
R.string.english
?