3

I am using UILocalizedIndexedCollation in my application to return indexed tableview. My locale is set to Hebrew and on the indexed table I can see index list with both English and Hebrew letters.

The order is always the same, first English alphabet and then Hebrew alphabet. Is it possible to place Hebrew alphabet above English alphabet in the index list (same as Contacts app)?

Nadav
  • 304
  • 3
  • 11
  • According to the `Technical Q&A QA1739`, you must declare support for Hebrew localization, either by adding the appropriate .lproj folders, or by specifying supported localizations in your CFBundleLocalizations key in your application's info.plist file – Marcelo Alves Jan 20 '12 at 19:11
  • 2
    Thanks for your answer. I've already done everything you mentioned here, but it still does not place the Hebrew letters above the English letters. – Nadav Jan 23 '12 at 13:18

1 Answers1

2

There's no way to configure UILocalizedIndexCollation to do this. It's a common problem, it also applies to Japanese (see UILocalizedIndexedCollation for Japanese giving different ordering to contacts/music apps ).

If you want to do it, you need to reorder the results from UILocalizedIndexCollation yourself before you use them. Obviously this requires some care to make sure you change all the arrays in the same way, and further care to make sure you get things in the right order.

Community
  • 1
  • 1
JosephH
  • 37,173
  • 19
  • 130
  • 154
  • This is almost a decade later but could you share how did you implement indexing for Japanese? – batman Oct 26 '21 at 09:58