9

I'm trying to use a localized index for my UITableView same as iPhone's Contacts application . here is how I return an array of characters:

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
    return [[UILocalizedIndexedCollation currentCollation] sectionIndexTitles];
}

I changed the language setting to a non-English (Ex: Russian). However, it always returns an array of character in English:

|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|#

It is unlike the iPhone Contacts application which shows the index with merged Russian and English characters.

Is there anyway to get the localized array of characters?

Mehrdad M
  • 171
  • 2
  • 7
  • 2
    I found the solution! In order to get localized table index using above API, your application should provide the corresponding localization language. – Mehrdad M Aug 02 '10 at 06:13
  • 1
    How do you provide the localization language for the application? – MdaG Jun 21 '11 at 11:48
  • yes, how do you provide localization ? – tesmojones Sep 20 '13 at 01:42
  • in Xcode, go to your Project(in project navigator), in the Info tab you will see list of all Location Languages which you can add/remove to. Hope it helps. – Mehrdad M Dec 11 '13 at 23:55

1 Answers1

1

You can use CLDR's 'index characters' as I described here: C#: get letters of alphabet for scandinavian language?
That function probably does the same internally, or it wants to.

Community
  • 1
  • 1
Steven R. Loomis
  • 4,228
  • 28
  • 39