
r3 generates its targets by first searching for and then combining templates and translations. r3 manages these resources in the context of a number of categories like project (mail or search), locale (uk or us) and page (index.php or about.js). It uses an inheritance hierarchy to create a search path to each of a target's parts. This allows you to reuse page elements from category to category and lets you create specialized versions of others.
Here's an example that uses the Yahoo! home pages for three different locales: the US, the UK, and Japan. You can see that the US and UK home pages have the same look and feel, but with small differences. They share the same page layout but with customized header, navigation, and content. The Japan home page looks very different, but you can still see some similarities -- note, for example, the home page logo and the search box.
You could create each of these pages in a completely customized manner, of course. But the pages shown above change regularly, and that sort of customized work becomes impractical, particularly as the websites grow in complexity. The ideal then is to reuse common components as much as possible, and still allow room for differentiation.
Through r3, you can arrange your files in small, logical units suitable for reuse. This spares the webserver the processing costs associated with reassembly and translation. And because most markup can be separated from procedural code, you can manage the HTML fragments without the risk of breaking functional code. When it comes time to push out changes to your sites, r3 generates the targets for deployment by combining template files, filling them with the (translated) data, to form the larger HTML. All this happens prior to deployment, which means the web application itself can be left to process the user requests.
Finally, note that r3 doesn't have to be used to localize websites, though that is the most common application. It is has been generalized so it can be used in any text-file based context to generate families of related, but different, text-based output. And the output you generate doesn't have to differ along language or international lines. There can and often are other axes of differentiation, such as different product lines or different kinds of branding.