localization from inside the application in iphone
how can we localized our application from the button in built in application not from iphone setting. please suggest me something i am stuck in it. Thanx in advance开发者_StackOverflow
You change the bundle before you call for the translation;
NSString *bundle_path = [[NSBundle mainBundle]
pathForResource:@"Localizable"
ofType:@"strings"
inDirectory:nil
forLocalization:@"se"];
NSBundle *localized_bundle = [[NSBundle alloc]
initWithPath:[bundle_path stringByDeletingLastPathComponent]];
NSString* translated = NSLocalizedStringFromTableInBundle(@"KEY", nil, localized_bundle, nil);
精彩评论