tags:

views:

105

answers:

1

NSLocale *curentLocale = [NSLocale currentLocale];

  NSString *locale = [curentLocale displayNameForKey:NSLocaleIdentifier value:[curentLocale localeIdentifier]];

NSLog(@"locale = %@",locale);

I'm getting on console locale = English (India) .this comes because my device is from india. if i take the country with maximum charactor and language with maximum charactor ,then how much charactors a locale can have???this is my question??

+2  A: 

You could use [NSLocale availableLocaleIdentifiers] to get an NSArray with all available locale identifiers. Then loop through the array and search for the one with the most characters.

I'd be careful with this, though, and cater for longer strings, because I would imagine that the list of available locales could change in the future.

Thomas Müller