Finding Non-localized Strings in xcode

If you have ever done some localization in xcode, you might already know how hard is it to track the non-localized strings used in the code and in storyboard. From xcode 7, there is an easy way to do that. Let me show you that.

I am not going to explain how to do localization in iOS in this article.

Rushing through the basics, we can do localize the string in two ways.

  • In code by using .
  • Use storyboard localizations.

It’s common that we add the method in the code and to forget to add it in the file. Also, we might localize the storyboard file and will add a new label later on in the UI which you will forget to add in the localized storyboard strings file.

To track these kind of silly mistakes, xcode 7 and above provides an option.

In the scheme editor take a look at the Options tab. In the following screenshot I have “Show non-localized strings” enabled .

Edit scheme
scheme editor

Show non-localized strings checkbox needs to be checked and we can select the application language as required. Then compile and run the app.

I have added a string as a label’s text ( is a UILabel):

calculatorDisplay.text = NSLocalizedString(“Some localized string”, comment: “”)

Also, the string is not added in the file. In this scenario, it will throw an error in the debugger.

Localizable strings in storyboard:

Storyboard strings file

For the localizable strings in storyboard which are not added in the file, the debugger will throw error like:

error for storyboard objects

Let’s check the first error:

  • Copy mentioned in the error and search for it throughout the project.
searching storyboard object

It appears to be a UIButton’s Object ID and the localizable text is the UIButtons title . Click on the search result and it may highlight the object in storyboard.

The storyboard strings file normally looks like this:

storyboard strings file

Where , is the objectid of a UIButton. Now copy the and add it to the strings file.

“GsZ-Y5–7R1.normalTitle" = "Localized title for button";



How to localize the strings file and localizing the storyboard files are not covered in this article. This process is pretty easy. I am planning to create an article on localization and internationlization in the near future.

Hope you learned something new today.

Note: Fabrizio Bernasconi mentioned a website to generate the localizable strings file. Just give it a try.

Generate Localizable.strings from XCode project:


If you enjoyed reading this post, please share and recommend it so others can find it 💚💚💚💚💚💚 !!!!

You can follow me on Medium for fresh articles. Also, connect with me on LinkedIn.

If you have any comment, question, or recommendation, feel free to post them in the comment section below!

iOS and tvOS developer, dreamer, photographer 🤨

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store