Localizing a plist with grouped data

Posted by Robert Altman on Stack Overflow See other posts from Stack Overflow or by Robert Altman
Published on 2012-04-09T23:26:05Z Indexed on 2012/04/09 23:28 UTC
Read the original article Hit count: 198

Filed under:
|
|
|

Is there a way to localize a plist that contain hierarchical or grouped data?

For instance, if the plist contains:

  • Book 1 (dictionary)
    • Key (string)
    • Name (string)
    • Description (localizable string)
  • Book 2 (dictionary)
    • Key (string)
    • Name (string)
    • Description (localizable string)
      (etcetera...)

For the sake of the example, the Key and Name should not be translated (and preferably should not be duplicated in multiple localized property lists).

Is there a mechanism for providing localizations for the localizable Description field without localizing the entire property list? The only other strategy that came to my mind is to store a lookup key in the description field and than use that to retrieve the localized text via NSLocalizedString(...)

Thanks.

© Stack Overflow or respective owner

Related posts about ios

Related posts about cocoa