Bill Kary
Bill Kary

Reputation: 705

iOS multi language works on Simulator but not on Device

I have a bilingual iOS Universal app. It works fine in Simulator that when i change the language in settings, the app load the respective language resources (images, text).

However, when it comes to device, it doesn't work, it remains the default language (english) and the change of setting doesn't take effect.

I have no clues on it as I think i did nothing wrong in coding. Is there any settings thingies that i have missed out?

Thanks.

UPDATE: i found that the text in Localizable.strings could be loaded with correct language, however, the Images resource under the respective localization folder, the localized nib file could be loaded but all the respective images file could not be loaded successfully.

Upvotes: 2

Views: 935

Answers (2)

Jan Weinkauff
Jan Weinkauff

Reputation: 224

Do you use NSLocalizedString, ... ? Did you change the language or only the region?

You can see which language is used by print the locale identifier

NSLog(@"%@", [[NSLocale currentLocale] localeIdentifier]);

Upvotes: 1

Bill Kary
Bill Kary

Reputation: 705

OK, I don't know if that is the bug of Xcode or what.

The image file will not refresh on device (it did on simulator), what i did to make it work is:

  1. Backup the resouce folder in Xcode
  2. Delete everything under Resource Folder in Xcode
  3. Re-drag everything to Xcode
  4. Clean
  5. Build.

The app on device can now load the correct resources.

Upvotes: 1

Related Questions