title: Possible to use variables and/or parameters with NSLocalizedString?
body: <p>I have tried using a variable as an input parameter to NSLocalizedString, but all I am getting back is the input parameter. What am I doing wrong? Is it possible to use a variable string value as an index for NSLocalized string?</p>
  
  <p>For example, I have some strings that I want localized versions to be displayed. However, I would like to use a variable as a parameter to NSLocalizedString, instead of a constant string. Likewise, I would like to include formatting elements in the parameter for NSLocalizedString, so I would be able to retrieved a localized version of the string with the same formatting parameters. Can I do the following:</p>
  
  <p>Case 1: Variable NSLocalizedstring:</p>
  
  <pre><code>NSString *varStr = @"Index1";
  NSString *string1 = NSLocalizedString(varStr,@"");
  </code></pre>
  
  <p>Case 2: Formatted NSLocalizedString:</p>
  
  <pre><code>NSString *string1 = [NSString stringWithFormat:NSLocalizedString(@"This is an %@",@""),@"Apple"];
  </code></pre>
  
  <p>(Please note that the variable can contain anything, not just a fixed set of strings.)</p>
  
  <p>Thanks!</p>