title: iOS – Localized JSON resource
body: <p>I have a JSON resource resource.json in my /MyApp/Resources/ folder. I want this resource localized so I have chosen in Xcode to localize it for swedish and english. I now have 2 folders:</p>
  
  <p><strong>/MyApp/Resources/sv.lproj/resource.json</strong></p>
  
  <p>And</p>
  
  <p><strong>/MyApp/Resources/en.lproj/resource.json</strong></p>
  
  <p>So far so good. But whenever I try to use this resource with:</p>
  
  <pre><code>NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"resource" ofType:@"json"];
  NSString *jsonString = [NSString stringWithContentsOfFile:jsonPath encoding:NSUTF8StringEncoding error:&amp;error];
  </code></pre>
  
  <p><code>jsonString</code> will always contain the english version of the resource. I have tried switching languages in both simulator and on device to no avail.</p>
  
  <p>I'm not sure how to troubleshoot this...</p>