memmons
memmons

Reputation: 40502

How to add localized .strings files back to Xcode?

I have a .strings file that is localized in a number of languages. I'd like to add it to my Xcode project. How do you get Xcode to correctly reference the files? I've tried

UPDATE: Submitted a bug report to Apple: #10181468.

Upvotes: 8

Views: 7658

Answers (2)

Max Desiatov
Max Desiatov

Reputation: 5565

The simplest way as of Xcode 4.6 is to drag localization file (.strings file, not the folder it's located inside of) from Finder to the Xcode project tree. Be accurate and drag to the top of .strings group, not to the bottom or inside of the group as the latter makes Xcode crash.

Upvotes: 14

Johnmph
Johnmph

Reputation: 3391

Add the original file (only the file, not the .lproj folder) then make it localizable, add all languages you want, xcode will create .lproj folders and duplicate your original file for each language.

After you can overwrite each file duplicated by your already translated file (either the file if it have the same name or content).

Don't forget to set the format of the original file to UTF-16 when you add it.

Upvotes: 7

Related Questions