in order to localize my App, I use the following code:
NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];
if ([language is
You shouldn't split the NSLocale. NSLocale has some Keys, which you can retrieve with objectForKey:
In your example you can write the following:
[[[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]
isEqualToString:@"fr"]
[NSLocale currentLocale] is actually the same as [[NSLocale preferredLanguages] firstObject] but has some additional information where you can retrieve which decimal separator should be used or which currency symbol.
Other relevant Keys can be found in the class reference from apple.