The secret to this method is the database, and a small library of code:
The database needs a table, say "babel", that holds in it each translation for each language you're using. The table has 4 fields - transID, transKey, languageID, translation.
In the database, there should be a line for each bit of text in each language:
1 "This is some text" 1 "This is some text"
2 "This is some text" 2 "This is some text in Russian"
In this example, I've used the english text (or first 255 chars of) as the transKey - this is to make calls to the translations much easier.
Once you have all your translations in the database, you need a function to get them out. All you need to pass to this function is the language you want, and the key you have (first bit of English translation). The function does a simple search on the database for the corresponding text in the language specified.
Of course, hitting your database for each translation is not the ideal solution. If your site is big enough, and your skills suitably advanced, you can write a decent caching mechanism for this system, so you can benefit from improved speed while still keeping your translations based in the database.
I've used this system on large databases, and it's great 🙂