>why use icu4j for this? especially if you're *just* using core java 
>locales rather than ULocale? if you want *all* the CLDR locales you
need 
>to use icu4j's ULocale.

I was going to use the ICU4J libraries as they included extra features
for calendars, etc. which I thought could come in handy down the road.
In my CFC I was actually using com.ibm.icu.util.ULocale.


>well for one thing, getLocale() returns the *server* locale as a cf 
>locale, i imagine you'd want the user's locale? how are you determining

>or handling the user locale?

I was under the impression that getLocale() and setLocale() worked on
the current request.  I was using setLocale(myQuery.userLocale) to set
the current request to the users locale and then within my CFC manage
working with that locale to get the correct RB file.

When working with what I have set up now, I have a few lines in my
application.cfc that uses setLocale(userLocale) to set their requests to
the correct locale.  But in certain cases where I've got say "us_GB"
stored for the user, CF will return "English(UK)" which forces my CFC to
fail to render things correctly.  Is there another way I should handle
this?


Rich Kroll


-----Original Message-----
From: Paul Hastings [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 1:15 PM
To: CF-Talk
Subject: Re: Locale problems

Richard Kroll wrote:
> insight.  I've got a resourceBundle CFC set up that uses the Java
ICU4J
> library to manage my RBs.  My problem comes up when I'm using

why use icu4j for this? especially if you're *just* using core java 
locales rather than ULocale? if you want *all* the CLDR locales you need

to use icu4j's ULocale.

> ColdFusion name (for example, English (US))."  The ICU4J library
expects
> java locales, and when CF returns a string instead of the java locale,

well for one thing, getLocale() returns the *server* locale as a cf 
locale, i imagine you'd want the user's locale? how are you determining 
or handling the user locale?

> string equivalent.  Is there a way to force CF7 to return the java
> locale, or perhaps another way to deal with this problem?

no, cf locale isn't quite a java locale but for your purposes all you 
need is core java locale ID (or icu4j ULocale) & you can build the 
locale object in one line of code.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251518
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to