O'Reilly logo

Modding Mac OS X by Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Peeking at (and Playing with) String Files

Most Mac OS X applications contain internationalized string files, typically named Localization.strings. This file appears in each language-specific lproj folder, and allows developers to internationalize their applications by providing language-specific alternatives for string replacement.

String files generally use UTF-16 (Unicode) encoding, which makes them difficult to view or edit in Terminal. (Some use UTF-8, but that’s less common.) UTF-16 uses extra bits for each alphabetic character, allowing a much wider range of characters to be used. Unicode can handle character sets ranging from French to Norwegian, from Japanese to Finnish, from Korean to Dutch; visit http://www.unicode.org to learn more. The Unicode site lets you view and download character code charts and search through the character database.

Figure 3-10 shows what a Terminal window might look like as you attempt to list the contents of a Localization. strings file. Fortunately, you can easily view and edit string files in TextEdit, which fully supports UTF-16 character encoding.

Localization.strings files use Unicode UTF-16 encoding, making them hard to view or edit using Terminal.

Figure 3-10. Localization.strings files use Unicode UTF-16 encoding, making them hard to view or edit using Terminal.

In the example shown here, more treats each 8-bit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required