Aidan Whitehall wrote:
> Is there a way of getting a localised version of the string returned
> by GetLocale()?
it's showing that because you haven't changed the locale for that request.
> i.e. kinda like LSGetLocale() which would return the Spanish for
> "Spanish (Standard)" if the locale had first been set to that.
pre cf7:
<cfscript>
locale=createObject("java","java.util.Locale").init("es","ES");
localizedName=locale.getDisplayName(locale);
writeoutput("#localizedName#");
</cfscript>
pre-cf7, using core java buys you a LOT more locales. post-cf7 you get all the
core java locales AND the nice java style locale id: "es_ES" instead of the
goofy & verbose "Spanish (Standard)" (bluedragon still uses that style) in cf.
that said, icu4j gets you even more locales & i18n functionality. further, a
locale by locale comparison of core java (and hence cf) with the common locale
data repository (CLDR) used by icu4j shows gobs & gobs of bad locale data
(mostly formatting) in core java.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244858
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54