We have a basis for when (if) our site goes beyond the international, which works like this ...
Folder structure;
/ lang/ english/ images/ text/ dutch/ images/ text/
Any text or language-specific images are removed directly from the page and replaced with constants. for example, on the login screen:
echo TEXT_LOGIN_WELCOME;
which is defined in /lang/english/text/login.php as;
define('TEXT_LOGIN_WELCOME', 'Welcome, please login:');
but in /lang/dutch/text/login.php it is defined as:
define('TEXT_LOGIN_WELCOME', 'Welcome, please login (in dutch):');
; -)
Each language-defining file is called exactly the same as for the page for which it is used, therefore, when we load the page with open access, we only need to find out what language the user speaks, and we can include the corresponding language definition file.
The good thing about this system is that all language information is centralized. When you need to add a new language, just copy the main (English?) Folder, rename it, write down the whole thing and send it to the translation service to work with their magic. Of course, the disadvantage of this system is the maintenance, as languages and content are growing ... If anyone has any bright ideas about this, I would like to hear them!
Btw, if you need to guess the user's location by IP, you can check geoIP .