Hi I'm trying to localize an app; database is stored on external server www.XXXXX.com/MyAnnotations_es.plist. Actually I've got two plists MyAnnotations_es.plist and MyAnnotations_en.plist
In Localizable.strings (Spanish) I've got:
and in Localizable.strings (English) I've got:
On the ViewController:
With this, when I switch to Spanish language on my device shows MyAnnotations_es.plist database. And when English language is switched it shows MyAnnotations_es.plist.
I'd like to show MyAnnotations_en.plist
How can I do it?
Thanks in advance
In Localizable.strings (Spanish) I've got:
Code:
[COLOR="Navy"]"MyAnnotations_es.plist" = "MyAnnotations_es.plist";[/COLOR]
Code:
[COLOR="Navy"]"MyAnnotations_en.plist" = "MyAnnotations_en.plist";[/COLOR]
On the ViewController:
Code:
[COLOR="Navy"]- (void)downloadPlist {
NSLog(@"Download in progress...");
[refreshPlist release];
deletePlist.enabled = NO;
progressView.alpha = 1.0;
pushToOpen.hidden = YES;
pushToOpenText.alpha = 0.0;
// Here we're downloading the .plist file from a server to the app's Documents Directory.
// Create file manager
fileManager = [NSFileManager defaultManager];
// Point to Document directory
documentsDirectory = [NSHomeDirectory()
stringByAppendingPathComponent:@"Documents"];
documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString *filename = NSLocalizedString(@"MyAnnotations_es.plist", @"filename for annotations");
filePath = [documentsDirectory stringByAppendingPathComponent:filename];
NSString *urlStr = [@"http://www.XXXXX.com/" stringByAppendingString:filename];
NSURL *url;
url = [NSURL URLWithString:urlStr];
request = [ASIHTTPRequest requestWithURL:url];
[request setShowAccurateProgress:YES];
[request setDownloadDestinationPath:filePath];
[request setDownloadProgressDelegate:progressView];
[request setDelegate:self];
[request startAsynchronous];
}[/COLOR]
I'd like to show MyAnnotations_en.plist
How can I do it?
Thanks in advance
Last edited: