开发者

localization from inside the application in iphone

开发者 https://www.devze.com 2023-02-09 19:01 出处:网络
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

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

精彩评论

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