Name

GetLocale

Synopsis

                  
                  GetLocale( )

Returns the current locale for your server. The server’s locale determines display and formatting options for currency, date, number, and time values and is determined by the server’s operating system. At startup, ColdFusion sets a variable, Server.ColdFusion.SupportedLocales, that contains a comma-separated list containing all supported locales for your ColdFusion server. The following example lists all supported locales for your server, with the current locale in bold:

Supported Locales with Current Locale in <b>Bold</b>:
<p><cfloop index="Locale" list="#Server.ColdFusion.SupportedLocales#">
  <cfoutput>
    <cfif Locale is GetLocale( )>
      <b>#Locale#</b><br>
    <cfelse>
      #Locale#<br>
    </cfif>
  </cfoutput>
</cfloop>

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.