While displaying locale, we can use getLocale() function. But we may need to have output as localized version.
We can use GetLocaleDisplayName() function to display any locale in another locale.
Here is the sample code:
<cfscript>
/* Defining custom parameters
*/
myLocale = "tr";
outputLocale = "de_DE";
</cfscript>
<!--- Formatting output --->
<cfoutput>
#GetLocaleDisplayName(myLocale,
outputLocale)#<br>
</cfoutput>
<br />
<br />
<!--- Formatting output for available locales in
ColdFusion --->
<cfoutput>
<cfloop index="loopid"
list="#server.coldfusion.supportedlocales#">
<!--- Rendering output in same locale
--->
#GetLocaleDisplayName(loopid, loopid)#
<br />
</cfloop>
<!--- Formatting output for available locales in
ColdFusion --->
<cfloop index="loopid"
list="#server.coldfusion.supportedlocales#">
<!--- Rendering any custom locale in
other available locales --->
#GetLocaleDisplayName(myLocale, loopid)#
<br />
</cfloop>
</cfoutput>
+