Home > Products > ColdFusion > Support > Internationalization
ColdFusion Icon Macromedia ColdFusion Support Center - Internationalization
Procedures and example code

This section provides procedures to perform the tasks mentioned in this article and code examples.

To change the local computer's system locale value:

1 In the Control Panel, select Regional Options.
2 In the General tab, determine whether the locale you want is selected.
If so, go to the next step.
If not, install the locale (select the locale and click Apply; the computer prompts for the Windows disk).
3 In the Regional Option window, in the General tab, select a locale. Click OK.
To change the local computer's Java default locale value:

To change the Java default locale value, do one of the following:

Set the System Locale to the target value.
Use command line parameters for the JVM.
Temporarily change the locale with a Java method call ( Locale.setDefault(_locale_) ).

To use command line parameters for the JVM, in the jvm.config file, add the following code to the end of the jvm.args line:

-Duser.language=<2-char-language-code> -Duser.region=<2-char-country-code> 

For example, to set language and country code to Japanese, use code such as the following:

-Duser.language=ja -Duser.region=JP

To change only the ColdFusion MX Administrator display to match the browser language setting, use code such as the following in your Application.cfm file:

<!--- Use the request to get the client's preferred locale --->
<cfset localize = getPageContext().getRequest().GetLocale()>
<cfif not isDefined("localize")>
	<!--- then use the default locale of the system we're running on --->
	<cfset request.locale = 
		createObject("java", "java.util.Locale").getDefault().getLanguage()>
	<cfset request.locale = localize.getLanguage()>

This does not change the LS* functions. This is a convenient way to change the language of the Administrator without restarting the ColdFusion server.

To Table of Contents Back to Previous document Forward to next document