开发者

App Localization: different language every second launch!

I'm testing my app on the iOS simulator. I have t开发者_开发百科wo files of Localizable.strings - one for Italian and one for German. In each of them I have accordingly:

"Updating..." = "Aggiornamento in corso...";

"Updating..." = "Daten werden aktualisiert...";

In the code I do:

NSString *updatingString = NSLocalizedString(@"Updating...", nil);

Now when the language in the settings of the simulator is set to German, every SECOND launch of the app the value of updatingString is "Updating..." and every other second launch it is "Daten werden aktualisiert...".

For the Italian language it is always correct and the value of updatingString is always "Aggiornamento in corso...".

Can anyone explain this magic?


Ok, I found the solution. Apparently I had multiple localization files, some of them came within the ShareKit library. It contained strings for german language too. So every second launch the simulator picked the ShareKit's localized string file, every other second launch - my own.

Strange though that XCode didn't let me know about the existing conflicts...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜