I'm trying to localize a key in the InfoPlist.strings files which consists of a nested dictionary, like so:
baseKey = {
secondDict = {
"key" = "value";
};
};
Is there any way I can access the inner key directly from the InfoPlist.strings file?
"baseKey.secondDict.key" = "newValue";
doesn't seem to work... Any ideas? I know I can replicate the dictionary structure in the strings file, but it contains some other information that I would prefer not to have in there.
Apparently it works like this:
Replace "value"
with some localization identifier newvalue_i18n_key
.
Then, in InfoPlist.strings for each language, do this:
newvalue_i18n_key = "value";
This is more similar to how NSLocalizedString works. To my reading, this is not what Apple says in the official documentation regarding localizing plist files, but it is what Apple does in some sample code.
This question comes up with the same answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With