I've an iPhone app that i wanted to localize so i've added chinese localization. To do so I added Localizable.strings(chinese) to my app and i added the strings in it.
But a weird thing happens when I compile, only half or maybe even less of the strings are translated. I've tried everything i could:
even putting working string & keys in not-working string but nothing is working.
All of my elements are UILabels and I've checked every single configuration for each of them. They all have the same configurations. It can be because of the project configuration but then why does some work? I have checked some other answers and tried the solutions (checking my keys, file name etc) but nothing is working. Please help me understand why is it happening.
EDIT: Here's how I print my strings
//this one doesn't work
self.resolution.text = NSLocalizedString(@"RESOLUTION", nil);
//this one works
self.label1.text=NSLocalizedString(@"CAMERAS", nil);
And in my Localizable.strings file i have
"RESOLUTION"="Resolution";
"CAMERAS"="Cameras";
make another check, like inverting the order of the elements: try putting on the top on of the strings that does not figure out translated. then as a proof of concept try making a third localized file with non utf-8 chars (like in plain text with no frills)
The soltuion to my problem was to delete app from simulator clean and build again as explained by holographix. Thanks holographix :)
What i still don't understand is that i tried the procedure many times and it didn't work and then just like that it decided to start working. Even though my problem is solved it's still a mystery to me.
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