Marking some XIB/Storyboard strings as not localizable

I am using Base Internationalization for XIB/Storyboard files and the “Export for Localization” method using XLIFF files for translators.

I have some labels, buttons, etc. that have text that should be translated, but I also have labels where we use some placeholder text (like a full-name) so you can see what the view would look like when populated with data, but those labels always have their text come from an outlet programmatically.

  • Xcode “- loaded the nib but the view outlet was not set.” error
  • Resetting Storyboard on Logout
  • Create xib based interface with Xcode 5
  • Invalid color System, labelColor (warning given only once)
  • Universal app for iPad not loading iPad .xib files?
  • How do I add Main Menu to xib
  • Is there some way to mark this label’s .text property that is set in the XIB as non-localizable so that it doesn’t end up in the XLIFF (or resulting .strings) files.

    I know that I can remove the text — I also thought about having a prefix (like @”!DNL!”) to mean that the translator shouldn’t localize, but I am hoping that there is just a standard way to do this.

    2 Solutions Collect From Internet About “Marking some XIB/Storyboard strings as not localizable”

    This is now possible using the BartyCrouch command line utility which I recently wrote to solve this problem (see installation instructions in my answer on that thread).

    BartyCrouch runs ibtool for you and does additional processing on top of its resulting .strings file. It will exclude views from translation if you include #bc-ignore! into your value within your base internationalized Storyboard/XIB file.

    Please checkout out the related section within the README on GitHub for detailed information.

    It turns out the localization export from Xcode ignores attributed strings in the storyboard.

    So just set the type of text for every label/button you want to exclude to Attributed in the Attributes Inspector.

    enter image description here

    This will give you an attributed string rather than a plain string, which as far as I know has no implications, apart from the (empty) list of attributes that has to be kept in memory now.