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:

  • recreating my strings file,
  • changing keys,

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";

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top