ColdFusion SetLocale() - How to set the country language local

SetLocale() - set the country language local for coldfusion processing and the page returned to the client

SetLocale.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SetLocale function example: how to set the country language local for coldfusion processing and the page returned to the client</title>
</head>

<body>
<h2 style="color:Crimson">SetLocale Function Example</h2>

<cfset Locale = GetLocale()>

<cfoutput>
<b>current Local:</b> #Locale#
<br />
</cfoutput>

<cfset NewLocale=SetLocale("English (Canadian)")>

<cfset Locale = GetLocale()>

<cfoutput>
 <b>current Local[after change "English(Canadian)"]:</b> #Locale#
</cfoutput>

</body>
</html>





More ColdFusion examples