2

I have a String where i have to show to in a layout. In english it is showing fine but in arabic it is messed up :-

in English :- 01-Oct-2014 to 10-Nov-2014

in Arabic :- 01-Oct-2014 إلى 01-Nov-2014

The arabic rendering is like above. How can we move the to in arabic in middle ?

in Code :-

    holder.mPeriodTv.setText(presenter.getViewContext().getString(R.string.bill_period, startDate, endDate));

in arabic strings :-

    <string name="bill_period"><xliff:g id="from">%s</xliff:g> إلى <xliff:g id="todate">%s</xliff:g></string>

in english strings :-

<string name="bill_period"><xliff:g id="from">%s</xliff:g> to <xliff:g id="todate">%s</xliff:g></string>
STF
  • 1,485
  • 3
  • 19
  • 36
Rahul Gupta
  • 5,275
  • 8
  • 35
  • 66
  • check this http://stackoverflow.com/questions/10964488/how-to-make-the-text-direction-from-right-to-left – Yazan Jan 05 '17 at 08:48

1 Answers1

0
Misagh
  • 3,403
  • 1
  • 20
  • 17