开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜