User Guide

Table Of Contents
410 Chapter 17: Developing Globalized Applications
<p>LSCurrencyFormat returns a currency value using the locale convention.
<!--- loop through list of locales; show currency values for 100,000 units --->
<cfloop LIST = "#Server.Coldfusion.SupportedLocales#"
index = "locale" delimiters = ",">
<cfset oldlocale = SetLocale(locale)>
<cfoutput><p><b><I>#locale#</I></b><br>
Local: #LSCurrencyFormat(100000, "local")#<br>
International: #LSCurrencyFormat(100000, "international")#<br>
None: #LSCurrencyFormat(100000, "none")#<br>
<hr noshade>
</cfoutput>
</cfloop>
This example uses the ColdFusion variable Server.Coldfusion.SupportedLocales, which
contains a list of all supported ColdFusion locales.
Processing a request in ColdFusion
When ColdFusion receives an HTTP request for a ColdFusion page, ColdFusion resolves the
request URL to a physical file path and reads the file contents to parse it. A ColdFusion page can
be encoded in any character encoding supported by the JVM used by ColdFusion, but might
need to be specified so that ColdFusion can identify it.
The following figure shows an example of a client making a request to ColdFusion:
The content of the ColdFusion page on the server can be static data (typically HTML and plain
text not processed by ColdFusion), and dynamic content written in CFML. Static content is
written directly to the response to the browser, and dynamic content is processed by ColdFusion.
The default language of a website might be different from that of the person connecting to it. For
example, you could connect to an English website from a French computer. When ColdFusion
generates a response, the response must be formatted in the way expected by the customer. This
includes both the character set of the response and the locale.
The following sections describe how ColdFusion determines the character set of the files that it
processes, and how it determines the character set and locale of its response to the client.
ColdFusion
character set = ?
locale = ??
Request
Response
Client
character set = ?
locale = ??