Listing 1

<cfscript>
	// determines locale from IP
	geoLocator=createobject("component","cfc.geoLocator");
	// handles explicitly located java style resource bundles
	rb=createObject("component","cfc.javaRB");
	// guard against localhost, it can't be in our DB
	if (cgi.REMOTE_ADDR EQ "127.0.0.1") 
		ipAddress="147.66.10.158"; //somewhere down under
	else 
		ipAddress=cgi.REMOTE_ADDR;
	// get locale, combines IP & user chosen language from browser
	thisLocale=geoLocator.findLocale(ipAddress,cgi.HTTP_ACCEPT_LANGUAGE);
	// in this case, we're also looking for language for CSS class, so strip off
	 locale
	thisLang=left(thisLocale,2); //locale in java form, en_US, th_TH, etc.
	// resource bundles are stored under current app dir in resources sub-dir
	thisDir=GetDirectoryFromPath(expandpath("*.*"));
	rbFile=thisDir & "resources\welcome.properties";//some sort of welcome blurb
	welcomeRB=rb.getResourceBundle(rbFile,thisLocale); //move rb key/values to cf
	 struct
</cfscript>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title><cfoutput>#welcomeRb.title#</cfoutput></title>
	<!--- 
		in this case, we assume all locales stuffed into one CSS, a better 
		method would be to have a base CSS & import locale specific formatting 
		on a per locale basis.
	--->
	<link rel="stylesheet" type="text/css" href="css/g11n.css">
</head>
<cfoutput>
<body>
	<p class="#thisLang#">#welcomeRB.introTxt#</p>
	<p class="#thisLang#">#welcomeRB.giveUsYourMoneyTxt#</p>
</body>
</cfoutput>
</html>