I have a Spanish Localization File like this:
"Not Selected" = "No Seleccionado";
and my device is in spanish language ,i use English as default
I load a NSArray for using like datasource of a pickerView with several Strings :
elementsPickerViewSubConstituencyPatient=[[NSArray alloc] initWithObjects:NSLocalizedString(@"Not Selected",nil),
NSLocalizedString(@"Carer",nil),
NSLocalizedString(@"London Based",nil),
NSLocalizedString(@"Non-London Based",nil), nil];
in another method i want to recover the user selected value with:
NSInteger selectedRowConstituency= [self.constituencyFieldPickerOutlet selectedRowInComponent:0];
NSString *selectedValueConstituency = elementsPickerViewConstituency[selectedRowConstituency];
NSLog(@"Constituency: %@",selectedValueConstituency);
it works but it return the Spanish Value and i need the English Key , i didn´t find a simple way to do this .thanks