About Customizing for Different Locales and Platforms

In Mac OS X, a bundle, such as a framework, application, or plug-in, can be either global or localized. A localized bundle can have all or some of its resources localized. Resources that aren't localized are stored in a folder called Non-Localized Resources. Resources that are localized are stored in a series of folders, called lproj folders, one for each region that the bundle is localized for. That folder is named after the region with the suffix ".lproj"; for example, English.lproj or French.lproj.

Generally, each lproj folder should have a copy of every localized file. However, if an lproj folder is missing a particular localized file, the system uses the file in the bundle's development region's lproj folder. The development region's lproj folder must have a version of every localized file. The development region is set in the bundle's information property list.

In addition, you can refine the interface for different platforms, like Mac OS 9 and Mac OS X. Every file has a platform neutral version and some have additional platform variants. If a variant doesn't exist for a particular platform, the platform-neutral version is used. For example, a bundle can have a platform neutral resource file with a menu bar, and a platform-variant resource file with a menu bar designed specifically for Mac OS 9. The platform variants are stored in the same folder as the platform neutral file, with the name the region appended to the variants' file names; for example, menubar.r contains the platform neutral menu bar, and menubar-macosclassic.r contains the Mac OS Classic-specific one. Note that different regions can have different platform-specific files. For example. English.lproj might contain both a platform-neutral menu bar and a Mac OS 9 menu bar, but French.lproj might contain just a platform-neutral menu bar.