Take the 2-minute tour ×

I use Done button in my custom view and I'd like to make its title localizable. I know that system Done button from UINavigationBar is already localized and it would be perfect to get it's localized strings somehow. Is there a way to do this?

Using the whole UINavigationBar only because of localized Done button seems to be inappropriate.

Clarification: the point is to use the same localized strings, that system uses.

share|improve this question
You can find the strings in UIKit.framework in the simulator. I believe it is possible to load them directly from the UIKit bundle, but that's unwise; copying them out is safer (note that there may be copyright issues if you do this for long strings!). –  tc. Feb 22 '13 at 22:42
@tc. It sounds like exactly what I need! But I can't open that Localizable.strings files from UIKit.framework in readable format. –  Anastasia Feb 23 '13 at 0:19
TextWrangler should do the trick. Alternatively, if you use bash, alias plist-dump='plutil -convert xml1 -o /dev/stdout --. –  tc. Feb 23 '13 at 0:54
TextWrangler did it! Could you please create an answer from your comment, I'll accept it. –  Anastasia Feb 23 '13 at 13:26
add comment

2 Answers

up vote 2 down vote accepted

There isn't an official way to get standard strings from the OS, but it's highly likely that all the strings will be in localized strings files, and most of those are present on the simulator (it won't have strings from apps that aren't present on the simulator, but should have almost all the strings from frameworks).

The simulator's framework directory is relative to your Xcode install directory and something like this (typing it from memory, change the version as appropriate):


To start with, I'd look in UIKit.framework/en.lproj/*.strings (or English.lproj or en_US.lproj). Strings files are plists and will generally be binary plists on device (such files start with "bplist00"). There are various ways to open these: TextWrangler will automatically display plists as XML, and the command-line tool plutil will convert to other formats. I use the bash alias


When you've found the string, you have a couple of options:

  • Load it directly from the framework at runtime with something like

    [[NSBundle bundleWithIdentifier:...] localizedStringForKey:@"DONE" value:nil table:...]

    This is not recommended. Yhere's no guarantee that it will work on a different OS version. (In practice, a string like "Done" probably won't move, but the alternative is easy enough that it's not worth the fuss.)

  • Copy the strings into your project. I don't know of a tool to automatically do this and merge with your existing Localizable.strings, but it probably exists somewhere and would not be too difficult to write. Slightly legally dubious (but not much more so than copying strings by eye for the languages you care about); I would definitely avoid doing it on a prerelease SDK to avoid concerns about Apple's NDA.

  • Copy the whole strings file into e.g. UIKit.strings and use something like NSLocalizedStringFromTable(@"DONE",@"UIKit",nil). Likely to be a copyright infringement!

In practice, I think Apple is unlikely to care about copying a handful of strings/images from iOS into an iOS app. Copying them into an Android app is another matter entirely...

share|improve this answer
add comment

Just add needed localization in project settings, all system stuff like done button will be localized by device locale if you added it, else it willbe on default language which you also should set up.

For custom button:

[self.myButton setTitle:NSLocalizedString(@"my localizable title", @"") forState:UIControlStateNormal];

It also valid for any NSString in your project.

NSString *someText = NSLocalizedString(@"my localizable title", @"");
self.myLabel.text = someText;

You should make your app localizable anyway by adding needed localizations.

After that just follow this instructions:


But I really recommend to you to do this in the end of project.

share|improve this answer
My Done button is just a UIButton from my custom view, it's not a system button. –  Anastasia Feb 21 '13 at 23:59
Oh I see. Are you going to use it without xib? –  iiFreeman Feb 22 '13 at 0:01
Yes, I'm going to set title programmatically. –  Anastasia Feb 22 '13 at 0:03
I updated my answer. Hope it will help –  iiFreeman Feb 22 '13 at 0:08
You mean that I have to make localized string by myself anyway? The point was to use these strings from system button... –  Anastasia Feb 22 '13 at 0:13
show 2 more comments

Your Answer


