Coldfusion9 - Change ColdFusion geographic/language locale value




You can display ColdFusion geographic/language locale value using the following code.


<cfoutput>
        <p>#getLocale()#</p>
</cfoutput>


ColdFusion determines the locale value as follows:
By default, ColdFusion uses the JVM locale, and the default JVM locale is the operating system locale. You can set JVM locale value explicitly in ColdFusion in the ColdFusion Administrator Java and JVM Settings page JVM Arguments field; for example:

-Duser.language=en -Duser.region=US


or

You can open the jvm.config file and change the 'java.args' entry. You can add the following entry at the end of 'java.args'. If those entries already exists, you can change the values of Duser.language and Duser.region as you wish.

-Duser.language=en -Duser.region=US

Here in my case i need to change to en_US. So my 'java.args' entry in 'jvm.config' is as follows.

root@coldfusion [~]# cat /opt/coldfusion9/bin/jvm.config | grep java.args
java.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -server -Djava.awt.headless=true -Djava.security.manager "-Djava.security.policy=/opt/coldfusion9/lib/coldfusion.policy" "-Djava.security.auth.policy=/opt/coldfusion9/lib/neo_jaas.policy" -Xmx2048m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars -Duser.language=en -Duser.region=US



Reference:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fa3.html

Leave a Reply