I really need to stop getting on rants when I go to write something useful.

I came across this in the iOS Localization Guide. If you’ve been impressed with Xcode 6’s new XLIFF features, but you wish you could have your CI server generate the XLIFF for you, FEAR NOT! With one simple command, you can spit out all the XLIFF that Xcode does, with none of the manual effort!

If you’re using Cocoapods or workspaces, you do still need to reference a project and not your workspace when running this command.

I believe that if you don’t put an export language then it’ll just export all of your development language strings.

One thing to note about the localizationPath <dirpath>  is that the command will output many XLIFF files to that path, so you might want to make a localizations folder so you can just publish the contents of that folder as an artifact.

You CAN specify more than one export language. To do so, just repeat the exportLanaguage  flag.

This is how you can export French and Spanish

If you try to do  -exportLanguage es,fr or  -exportLanguage esfr or even  -exportLanguage es fr it will think that you’re trying to export the “es,fr” or “esfr” language. Or it just won’t work in the case of the last one.


Leave a Comment

Your email address will not be published. Required fields are marked *