I'm working on a bilingual simple IOS App: a PDF file is loaded in a UIWebView with the method described here:
Loading Local PDF File Into WebView
In XCode, using the "Localization" feature, I added a second language (French). The MainStoryboard contains 2 "sub" storyboards, one for English, and one for French.
In the MainStoryboard (English), I inserted a UIWebview --> connect that view to the MainViewController.h --> add the code for inserting the English PDF file in the MainViewController.m:
NSString *path = [[NSBundle mainBundle] pathForResource:@"EnglishBook" ofType:@"pdf" inDirectory:@"PDFBooks"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[_UIWebViewBook loadRequest:request];
[_UIWebViewBook setScalesPageToFit:YES];
The English version runs well.
But... where to put the French PDF file ?
Is there a way to target a language-specific PDF file ?
Could "pathForResource:@" be "language" sensitive ?
Thanks for your help !