I want to use my dictionary keys for output in a grouped table. This has to be localized with all my other content. Can I use an NSLocalizedString as the key?
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
first_array, NSLocalizedString(@"First Array", @"The First Array"),
second_array, NSLocalizedString(@"Second Array", @"The Second Array"), nil];
You can, since it is just a string. That said, don't use this technique for dictionaries that you're going to write out and later read back in, because the user may change his or her language in between, and then you'll be looking for the wrong keys.
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