UILocalizedIndexedCollation returns only English sort

I am trying to get a localized index like Contacts using UILocalizedIndexedCollation. In contacts, when I change the language, the index changes according to the language. However, it sectionIndexTitlesalways returns an English index.

I tried this with the demo application I created, and with 3_SimpleIndexedTableView, which is Apple's demo application, and no application has a localized index.

I tried to create a localization folder for the current locale (I used [[NSLocale autoupdatingCurrentLocale] localeIdentifier]to determine the current locale). This does not affect the index.

I looked for the appropriate settings plist, did not find anything.

Am I missing something or is it UILocalizedIndexedCollationreturning only English sorting?

+2
source share
2 answers

Solved!

I did not have a localization folder in my application set for the target language. I added sv.lproj(Swedish) and the sorting worked as expected. The folder is empty, her presence is all that is required for her work.

+1
source

You can also install Localized resources can be mixed = YESin Info.plist. If the key is missing, right-click and select Add Row.

+8
source

All Articles