Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A bundle is a directory of resources that may be used by an application. Resources include images, sounds, compiled code, and NIB files. (Users often use the word “plug-in” instead of “bundle.”) The class NSBundle is a very elegant way of dealing with bundles.
Your application is a bundle. In Finder, an application looks to the user like any other file, but it is really a directory filled with NIB files, compiled code, and other resources. We call this directory the main bundle of the application.
Some resources in a bundle can be localized. For example, you could have two versions of foo.nib, one for English speakers and one for French speakers. The bundle would have two subdirectories: English.lproj and French.lproj. You would put an appropriate version of foo.nib in each. When your application asks the bundle to load foo.nib, the bundle will automatically load the French version of foo.nib, if the user has set the preferred language to French. We will cover localization in Chapter 16.