I'm trying to get a localized index like Contacts by using UILocalizedIndexedCollation. In Contacts when I change the language the index changes to match the language. However sectionIndexTitles always returns an english index.
I have tried this with a demo app I created and with 3_SimpleIndexedTableView, which is a demo app from Apple and neither app have a localized index.
I have tried creating a localization folder for the current locale (I used [[NSLocale autoupdatingCurrentLocale] localeIdentifier] to determine the current locale). This does not affect the index.
I've had a look for relevant plist settings by found nothing.
Am I missing something or does UILocalizedIndexedCollation only return an English collation?
You can also set Localized resources can be mixed = YES in Info.plist.
If the key is missing right click and choose Add Row.
Solved!
I didn't have a localization folder in my app bundle for the target language. I added sv.lproj (Swedish) and the collation worked as expected. The folder is empty, it's presence is all that's required for it to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With