UILocalizedIndexedCollation isn't localized

Discussion in 'iPhone/iPad Programming' started by Stratoukos, Aug 22, 2010.

  1. macrumors member

    Joined:
    Jul 15, 2008
    #1
    I am trying to display a list of names in an indexed table view. Since I can't know the users' localization settings, I tried to use UILocalizedIndexedCollation.

    The problem is that no matter what the language/regional settings are set to, the array returned by UILocalizedIndexedCollation always contains the english letters A-Z plus the # symbol. I tried French, German and Greek but I always got back the same array.

    I am using the Window-based app template with the following code added in the application:didFinishLaunchingWithOptions: method.
    Code:
    NSArray *arr = [[UILocalizedIndexedCollation currentCollation] sectionIndexTitles];
    NSLog(@"%@", arr);
    I am running this on the iPhone Simulator with base SDK 4.0.

    Is this a problem with the simulator, Apple's APIs or am I doing something wrong?

    Thanks.
     

Share This Page