how do I use setlocale for an international application in order to display Japanese YEN
To summarize my problem, I want to use LSCurrencyFormat to format a number for Japanese yen. I am working on an international application where the OS is English version of Windows Server 2008 and an Japanese version of CF8 server. Before I make a mess on the server, I tested a different scenario on a laptop with English Windows Vista and English CF8. I added the Microsoft language pack. In the control panel, I changed the current format to Japan, current location to Japan, and system locale to Japan. After rebooting my laptop, there were a slew of problems. I could not use the application because setlocale threw errors about wrong locale, etc... What tidbits of information do I need to get the setlocale working. Is this something OS specific or ColdFusion specific. I don't know where or why this problem is occuring! I didn't want to make any changes on the server until I heard from a few of you with experience in this matter. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323922 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: how do I use setlocale for an international application in order to display Japanese YEN
mike pop wrote: In the control panel, I changed the current format to Japan, current location to Japan, and system locale to Japan. After rebooting my laptop, there were a slew of problems. I could not use the application because setlocale threw errors about wrong locale, etc... change it back. setLocale() shouldn't be throwing errors because you changed the server OS locale. try describing the exact problem again. something OS specific or ColdFusion specific. I don't know where or why this problem is occuring! describing the problem in detail w/examples, etc. might be a good start. I didn't want to make any changes on the server until I heard from a few of you with experience in this matter. don't make any changes on the server. change your code. btw you don't really need to use a localized cf8 for this sort of thing. cf8 running on top of an en_US locale server will support every locale java does. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323924 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: setlocale()
hi thanks for all your feedback. thanks adrian this is working fine now but will look into what the date object and cfqueryparam as advised thanks again richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295117 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
setlocale()
Hi, in the past we have had intimidated problems with the dateformat function and mysql therefore we want to use the setlocale() method to change to english UK. i am a little confused as our mysql wants dates to be in the format of /mm/dd and of course when we get the date out of the database we need it in the format dd/mm/ therefore does this mean that i should setlocale() to english UK. then when i am getting a date out of the database i use: lsdateformat(date, 'dd/mm/') then when saving to the database i need to use lsdateformat(date,'/mm/dd')? if i am write on this can i set the locale in the application.cfm page as we dont have access to the cf administrator on our server? is so could you please give an example and i cant find how to do it? and would it matter that our server is a host in the US - would it override their locale? then like i said do i always have to use the lsdateformat instead of dateformat thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294923 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: setlocale()
I think you're right on the useage. SetLocale() and LSDateFormat() in place of DateFormat(). You can place it in your Application.cfm/.cfc. cfset SetLocale(English (UK)) should do it. Adrian -Original Message- From: Richard White Sent: 17 December 2007 15:39 To: CF-Talk Subject: setlocale() Hi, in the past we have had intimidated problems with the dateformat function and mysql therefore we want to use the setlocale() method to change to english UK. i am a little confused as our mysql wants dates to be in the format of /mm/dd and of course when we get the date out of the database we need it in the format dd/mm/ therefore does this mean that i should setlocale() to english UK. then when i am getting a date out of the database i use: lsdateformat(date, 'dd/mm/') then when saving to the database i need to use lsdateformat(date,'/mm/dd')? if i am write on this can i set the locale in the application.cfm page as we dont have access to the cf administrator on our server? is so could you please give an example and i cant find how to do it? and would it matter that our server is a host in the US - would it override their locale? then like i said do i always have to use the lsdateformat instead of dateformat thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294924 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: setlocale()
Richard, When you insert dates into your database, you should be using cfqueryparam, which, when you specify the cfsqltype is cf_sql_date, will do the date format conversion for you. I think the trick is to think of it more like it's a date object that you format only for output, and is otherwise left in whatever format the database gave it to you. Anyways, I recommend using query params in place of date formatting for queries, including odbc date formatting. -- nathan strutz http://www.dopefly.com/ On Dec 17, 2007 8:39 AM, Richard White [EMAIL PROTECTED] wrote: Hi, in the past we have had intimidated problems with the dateformat function and mysql therefore we want to use the setlocale() method to change to english UK. i am a little confused as our mysql wants dates to be in the format of /mm/dd and of course when we get the date out of the database we need it in the format dd/mm/ therefore does this mean that i should setlocale() to english UK. then when i am getting a date out of the database i use: lsdateformat(date, 'dd/mm/') then when saving to the database i need to use lsdateformat(date,'/mm/dd')? if i am write on this can i set the locale in the application.cfm page as we dont have access to the cf administrator on our server? is so could you please give an example and i cant find how to do it? and would it matter that our server is a host in the US - would it override their locale? then like i said do i always have to use the lsdateformat instead of dateformat thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294925 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: setlocale()
Richard White wrote: therefore does this mean that i should setlocale() to english UK. then when i am getting a date out of the database i use: lsdateformat(date, 'dd/mm/') i would recommend using one of the java terms FULL,LONG,MEDIUM,SHORT instead. these guarantee the proper localized date format if you ever have to support other locales. then when saving to the database i need to use lsdateformat(date,'/mm/dd')? as others have said, you shouldn't be passing date strings to your db, use a cf datetime object instead. if i am write on this can i set the locale in the application.cfm page as we dont have access to the cf administrator on our server? is so could you yes. please give an example and i cant find how to do it? and would it matter that our server is a host in the US - would it override their locale? no, only the request that pulls in your application.cfm. then like i said do i always have to use the lsdateformat instead of dateformat yes if you want properly formatted dates for your locale. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294929 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
SetLocale problems
Hi, I have been using the SetLocale function successfully on a xp box running CF8 dev edition. However the exact same code is not changing the output language when it is run on a linux box using CFMX 6.1. Heres the code: cfset SetLocale(French (Standard)) Month text is being outputted using monthasstring() function. Anyone come across this issue before? Mike. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293014 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SetLocale()
Any one see what's wrong with this... cfset loacle = SetLocale(English (U.K.)) Aparently English (U.K.) is not a valid locale - do I need the quotations?when I remove them I get a different error.. In case it's of any importance I am running CF5 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: SetLocale()
cfset loacle = SetLocale(English (U.K.)) i believe its English (UK) not English (U.K.) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.368 / Virus Database: 204 - Release Date: 29/5/2545 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SetLocale()
Any one see what's wrong with this... cfset loacle = SetLocale(English (U.K.)) Aparently English (U.K.) is not a valid locale - do I need the quotations?when I remove them I get a different error.. In case it's of any importance I am running CF5 It's the periods you've got after U and K. Use this instead: cfset locale = SetLocale(English (UK)) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SetLocale()
It's without the dots cfset loacle = SetLocale(English (UK)) -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: woensdag 5 juni 2002 17:53 To: CF-Talk Subject: SetLocale() Any one see what's wrong with this... cfset loacle = SetLocale(English (U.K.)) Aparently English (U.K.) is not a valid locale - do I need the quotations?when I remove them I get a different error.. In case it's of any importance I am running CF5 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SetLocale()
Any one see what's wrong with this... cfset loacle = SetLocale(English (U.K.)) Aparently English (U.K.) is not a valid locale - do I need the quotations?when I remove them I get a different error.. In case it's of any importance I am running CF5 It's the periods you've got after U and K. Use this instead: cfset locale = SetLocale(English (UK)) Oh, and I forgot to mention that you can find the supported locales like this: cfoutput#Server.ColdFusion.SupportedLocales#/cfoutput Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: SetLocale()
ta guys - strange Forta book (4.5) says U.K. - knew he couldn't be perfect ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 05 June 2002 17:03 To: CF-Talk Subject: Re: SetLocale() cfset loacle = SetLocale(English (U.K.)) i believe its English (UK) not English (U.K.) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.368 / Virus Database: 204 - Release Date: 29/5/2545 __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
SetLocale() not working in v5
Repost - didn't see this appear 1st time around== Using SetLocale(English (UK)) and then LSCurrencyFormat returns dollars, not pounds sterling (down with the Euro! j/k). I'm reluctant to hard code £s... 99% certain this site will never be localised, but this will be a *big* issue on another site soon. Is there a fix? Others have seen this behaviour: http://www.cfbughunt.org/index.cfm?fuseaction=view_bugBugID=993Row =1 and there's no mention of this on the Hot Fixes page http://www.allaire.com/Handlers/index.cfm?ID=20371Method=Full#50 Thanks -- Aidan Whitehall [EMAIL PROTECTED] Macromedia ColdFusion Developer Fairbanks Environmental +44 (0)1695 51775 __ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists