1

Is it possible to dynamically add to a Localizable.strings file? My app will download new objects and I need to add the translations. If I can somehow add to the Localizable.strings file I can just call NSLocalizedString. Is this possible at all? Had a google around for this couldn't find anything that looked too concrete.

2
  • What are these new objects? How are you getting them? Commented Mar 11, 2015 at 19:59
  • My app has a custom class "stickers", each sticker has a title, UIImage, bio etc. I will be downloading new ones from Parse.com and then saving them to a dictionary. I can include strings of course with each sticker for the various languages but need some way to access/edit Localizable.strings Commented Mar 11, 2015 at 20:10

1 Answer 1

1

You could pass a language parameter to parse and have it send back just the appropriate language.

Or, you can have it send back a bundle which contains the localisation details, then use - (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)value table:(NSString *)tableName to extract the details.

Sign up to request clarification or add additional context in comments.

2 Comments

The first solution you mean essentially just make my own method to switch the strings based on what language the phone is set to?
The second one, does the app need to be restarted for the new bundle to be used though? Was looking in to doing something like this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.