搞砸了Android中的阿拉伯字符串

时间:2017-01-05 08:13:01

标签: android arabic

我有一个字符串,我必须在布局中显示。 在英语中它表现得很好,但在阿拉伯语中它很混乱: -

英文: - 2014年10月1日至2014年11月10日

阿拉伯语: - 01-Oct-2014إلى2014年11月1日

阿拉伯语呈现如上所述。我们怎样才能将阿拉伯语转移到中间?

代码中的

: -

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

在阿拉伯语字符串中: -

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

英文字符串: -

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