2 Answers
2

The .po (Portable Object) file is like a small library containing all the English terms in the theme with an empty column for non-English translations. Using software like Poedit, the .po file can be opened, translations can be added, and it can be saved, which also generates the .mo (Machine Object) file.

With a suitably localized theme, the steps involved in translating it are:

Run a tool over the code to produce
a POT file (Portable Object
Template), simply a list of all
localizable text.

Use a plain text
editor or a special localization
tool to generate a translation for
each piece of text. This produces a
PO file (Portable Object). The only
difference between a POT and PO file
is that the PO file contains
translations

Compile the PO file to
produce a MO file (Machine Object),
which can then be used in the theme
or plugin.

My first recommendation would be to read this article in the WordPress Codex.

To add language support, the first thing you need to do is make sure all of your echoed content is passed through a filter that can handle internationalization (i.e _e() and __()). Then you'll need to make sure everything is mapping to the same text domain.

From there, you'll use an external tool to parse all of your content for translatable strings, translate them, and save the appropriate language files. Full instructions and a list of resources are available on the codex article I linked to above.