7

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.

user273565
  • 205
  • 1
  • 15

1 Answers1

9

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.

Michael Anderson
  • 70,661
  • 7
  • 134
  • 187
  • Thanks! You are 100% correct. I used TextEdit and then cut and pasted the lines into the .strings file. It did not look right in Xcode, but that did not matter. – user273565 May 02 '11 at 01:26