views:

136

answers:

1

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 changes 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?

A: 

You can use CLDR's 'index characters' as I described here: http://stackoverflow.com/questions/1542781
That function probably does the same internally, or it wants to.

Steven R. Loomis