Monday, April 29, 2013

NSBundle localizedInfoDictionary example ios


localizedInfoDictionary

Returns a dictionary with the keys from the bundle’s localized property list.
- (NSDictionary *)localizedInfoDictionary
Return Value
A dictionary with the keys from the bundle’s localized property list (InfoPlist.strings).
Discussion of [NSBundle localizedInfoDictionary]
This method uses the preferred localization for the current user when determining which resources to return. If the preferred localization is not available, this method chooses the most appropriate localization found in the bundle.
Example of [NSBundle localizedInfoDictionary] - 1
[[[NSBundle mainBundle] localizedInfoDictionary]
       objectForKey:@"CFBundleDisplayName"]
Example of [NSBundle localizedInfoDictionary] - 2
_localisedName = [[[NSBundle mainBundle] localizedInfoDictionary] objectForKey:@"CFBundleName"];