Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Localization: application crashes when language is changed in simulator

In order to localize my application, I created Localizable.strings for three languages. I didn't need to localize any nib files since I'm not using any in my project. No images were localized, only the strings. In the code, I read the strings using NSLocalizedStrings(@"key", @"comment"). The Localized.strings files use UTF-16 format. The strings look like this: "Projects" = "Projekte";.

When I run the app in the simulator and change the language, my application that's running in the back crashes (SIGKILL). If I rerun the application, I can see that the language has been changed because the label of the Edit button is in German, but all my strings are still in English.

I read many threads about localization and I have three iOS books at home but I still don't know what I'm doing wrong.

Did I forget to set up something else? Any ideas?

like image 569
strave Avatar asked Jul 08 '11 15:07

strave


1 Answers

It's because when you change the language of your device, SpringBoard kills all the apps so that they will 'load' new language at the next startup. You can't change the system language without your app being killed. It has to be killed if you want to save your new language.

Your app doesn't crash. It's being killed (SIGKILL) by iOS.

like image 197
akashivskyy Avatar answered Nov 04 '22 10:11

akashivskyy