Apple has recently introduced a new process for translating files. You no longer have to use genstrings/ibtool for generating .strings
file - instead you simply use the .xliff
files export/import tool built right into Xcode:
https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html
Unfortunately when I'm trying to import right from Xcode, it crashes.
I wanted to test it out using xcodebuild -importLocalizations
as is described here (page 68):
https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/BPInternational.pdf
It turns out that there's no such importLocalizations
argument for xcodebuild (although there is an exportLocalization
)?! (man
command confirms this) Am I missing something? This has also been tested in Xcode 6.1.
Import Localizations Using XcodeIn the Project navigator, select the project, then choose Product > Import Localizations. In the import dialog that appears, select the Xcode Localization Catalog folder, and click Import.
Under the Localizations you add new languages. After you add the language here you select which files you want to localize. Click on the top right button shown in the screen below and select your project under the PROJECT tab. Show activity on this post.
I had the same problem and in my case I figured out that the running SourceTree application was the problem! I closed it and reimported successfully. Maybe it modifies something while importing.
One reason for the crash is, if the xliff file contains any empty localisable strings, then Xcode will crash while importing it.
Re-create the xliff will and make sure there are no strings left blank.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With