Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode .strings File does not seem to support Arabic Text

I created an app that I envisioned being localizable. So, I created a .strings resource file to keep my menu and alert message text, etc. When the time came for me to say:

"MyStringKey" = "السلم"

the Arabic letters became juxtaposed as I was typing because a .string file defines its entries in a left-to-right format (i.e. "a" = "b") whereas Arabic words are written right-to-left. It does not matter that the file encoding is UTF-8. The text direction cannot change to right-to-left in the file. Or so it seems to me.

How do I create entries in a .strings file like the one above? Thank you.

like image 669
user273565 Avatar asked May 01 '11 22:05

user273565


1 Answers

This sounds like an issue with the editor, not an issue with the support of .strings files in the core toolchain. So I'd create/edit my .string file in another editor that does support change of direction within a line, and just ignore the XCode editors lack of support for it. The file will look wrong when opened in XCode .. but that shouldn't matter.

like image 154
Michael Anderson Avatar answered Oct 20 '22 00:10

Michael Anderson