I\'m creating a Mac app and I want to localize my Labels. I thought a .strings
file would be a better choice. But I have trouble reading .strings
file
Simple Code
Just create a method as follows
- (void)localisationStrings
{
NSString* path = [[NSBundle mainBundle] pathForResource:@"localisation" ofType:@"strings"];
NSDictionary *localisationDict = [NSDictionary dictionaryWithContentsOfFile:path];
NSLog(@"\n %@",[localisationDict objectForKey:@"hello"]);
}