简体   繁体   中英

Localization not working for XIB file in XCode 6

I have created a XIB file which I am loading programmatically using initWithNibName. It contains an UILabel and UITextField. Via IB I have created the necessary strings files (German, English):

HelpView0.xib HelpView0.xib (base) HelpView0.strings (English) HelpView0.strings (German)

I am using base localization (development language: English). Issue: When I run the app it always pulls English texts, although the device language is German (same issue in Simulator).

Generally, my storyboard localization using strings file works well. I have tried deleting the app and emptying caches, without success. Does anyone have an idea what could be the problem?

Same here. For now I use localized XIB files where I have to, because some of my xib's are working properly with .strings files. Sad thing that this bug was found almost year ago here .

In Xcode 6 you need to select "Use Auto Layout". If you do that the strings file for the language running will be used without having to convert it into an XIB file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM