1

I have a plist with an array of dictionaries.

example:

items: (array)
    item0: (dictionary)
        Label: (string)
        Img: (string)
    item1: (dictionary)
        Label: (string)
        Img: (string)

using NSLocalizedString, the labels are translated.

With this code, I put everything in a dictionary, and after into an array.

NSString *myFile = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"plist"];

NSDictionary *dict = [[NSDictionary alloc]initWithContentsOfFile:myFile];

NSMutableArray *arr = [[NSMutableArray alloc] initWithArray:[dict objectForKey:@"Items"]];

How do I place into the array, however, the value directly translated, and not the key?

Thanks to all!

Vins
  • 1,814
  • 4
  • 24
  • 40

1 Answers1

0

How about:

 NSMutableArray * arr = [[NSMutableArray alloc] initWithArray: [dict allValues]];
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215