Localize hosted content In App Purchase [iOS 6 by Tutorials]

I’ve successfully implemented the chapter on hosted content for in-app purchases, but I’m having some questions about how to localize the content.

I found it easy enough to click on the “Localize” button in Xcode to localize the content, but how do you access it? When a user purchases content, do they only get the localized version, or do they get all versions?

The way the app works, it downloads the content when purchased, and then saves it to the Library directory. Then, the shared instance of the store holds an array of NSURLs that point to all the purchases in the Library. What I’m not sure of is how to access the localized version of the purchase, or whether when someone downloads a purchase only has the version for their language.

Here’s the code from the chapter that I think needs to be changed:

if (exists) {
    NSDictionary * contentInfo = [NSDictionary
                                  dictionaryWithContentsOfURL:contentInfoURL];
    contentVersion = contentInfo[@"ContentVersion"];
    NSString * contentsPath = [libraryRelativePath
                               stringByAppendingPathComponent:@"Contents"];
    NSString * fullContentsPath = [[self libraryPath]
                                   stringByAppendingPathComponent:contentsPath];
    if ([[NSFileManager defaultManager]
         fileExistsAtPath:fullContentsPath]) {
        libraryRelativePath = contentsPath;
        localPath = [[self libraryPath]
                     stringByAppendingPathComponent:libraryRelativePath];
        localURL = [NSURL fileURLWithPath:localPath 
                              isDirectory:YES];
    }
}

[self provideContentWithURL:localURL];`

The code for the library path:

- (NSString *)libraryPath {
NSArray * libraryPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
                                                             NSUserDomainMask, YES);
    return libraryPaths[0];
}

I was able to localized other files in the resources folder by doing this:

let path : NSURL = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Content", ofType: nil, inDirectory: nil, forLocalization: NSBundle.mainBundle().preferredLocalizations[0])!)

Do I have to change the contentsPath to the localized version? How can I do that from the NSURL that points to the Library?

Should I change the code to save in Resources, instead of Library?