Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android strings.xml resource - arabic language and dynamic formatted strings

Hello I have a question about arabic formatting how should I properly format this strings, it seems i can't manage this:

تحميل %1$s…

تم تحميل الكلمات. %1$d/%2$d!

This is in sublime text 2 - but i think that there is Left-to-Right order

enter image description here

EDITED: In Eclipse this copied from Sublime Text gets messed up a little. I hire some person to translate from english to arabic strings.xml. He used Word editor but things get messed up when coping to eclipse and I suggested to changed it in Sublime Text, that I think will support it correctly like in Eclipse and is lighter editor. I see that in Sublime Text seems to be in Left-To-Right order which is also wrong. * When I run app with this messed up special characters it seems to run correctly. Bu I have doubt whether some interpunction words hasn't also messed up and for example: Item 5/10 has been downloaded. will be Item has been downloaded. 5/10 or something like this.* Need a preferred way to get someone english written strings.xml, get this translated, and then copied into /values-ar and working correctly? enter image description here

like image 566
Michał Ziobro Avatar asked Mar 16 '15 07:03

Michał Ziobro


2 Answers

Try adding a RIGHT-TO-LEFT MARK character (\u200F) at the start of your text.

similar type answered here

like image 105
Fahim Avatar answered Oct 21 '22 15:10

Fahim


That is a sublime issue with Right-to-Left languages as listed here. You dont have to worry too much about it because it does not affect the results, your app will show it perfectly.

like image 33
Assem Avatar answered Oct 21 '22 17:10

Assem