July 26, 2007

scorpio's i18n changes

in case you were wondering, the main i18n changes for scorpio (coldfusion 8) really revolved around upgrading coldfsion's JDK to version 6. what did that buy us? well core Java's first set of locales based on CLDR data:
  • zh_SG - Chinese (Simplified), Singapore
  • en_MT - English, Malta
  • en_PH - English, Philippines
  • en_SG - English, Singapore
  • el_CY - Greek, Cyprus
  • id_ID - Indonesian, Indonesia
  • ga_IE - Irish, Ireland
  • ms_MY - Malay, Malaysia
  • mt_MT - Maltese, Malta
  • pt_BR - Portuguese, Brazil
  • pt_PT - Portuguese, Portugal
  • es_US - Spanish, United States
hopefully this trend will continue. beyond the new locale data it also provides support for the Japanese Imperial Calendar which we can tap into for date conversion and formatting simply by setting coldfusion's locale to the new JP variant:
<cfscript>
// set appropriate locale
setLocale("ja_JP_JP");
// Japanese Imperial Calendar date format writeoutput("#lsDateFormat(now(),"FULL")#");
</cfscript>
which should give you something like: 平成19年7月26日 how cool is that? for more details on the new i18n bits in JDK 6 see this.

0 Comments:

Post a Comment

<< Home