This question is continuum to that one: iOS – Could I change the localizable.strings content during runtime?
The answer was useful, however, there is a problem that I am facing. The printed string doesn’t include quotations (like these “”) for single word keys and/or values. This made the Localizable.string invalid file. Hence, nothing is retrieved from it even for keys/values with correct format.
Example:
GBP = GBP;
Glossary = Glossary;
“Go_Location” = “Go to location”;
First two are causing the file to be invalid strings file. How to fix that?
Solved it by enumerating the dictionary and printing each key/value pair to an NSString, then to the strings file.
Here is the code: