norwegian locale A-Go-Go
some recent work has me again turning over the rocks where core java locales are hiding and once again a closer look at what crawled out reveals just how sweet icu4j's locale support really is. according to several resources, such as ethnologue and the odin archive (gotta love that name), norway has two main written languages Bokmål and Nynorsk, with Bokmål being dominant. in core java there is one (well two if you include the plain norwegian langauge, no) locale and one variant for norway: no_NO and no_NO_NY. assumming core java meant Bokmål for plain Norwegian (no and no_NO), then i suppose the variant (no_NO_NY) is for Nynorsk. huh? but i thought Nynorsk was a language? why is it a variant here? in icu4j, which uses the CLDR for it's locale data, we can see two locales (four if you count the plain nb/Bokmål and nn/Nynorsk languages): nb_NO (Bokmål Norwegian) and nn_NO (Nynorsk Norwegian). neat and tidy.one of the side effects of this core java locale is that ColdFusion's old locale name Norwegian (Nynorsk) actually produces no_NO locale data. any legacy apps still using this locale identifier are probably telling people the wrong thing, for example:
setLocale('Norwegian (Bokmal)');
writeoutput('#lsDateFormat(now(),"DDDD")#');
produces: mandag
while
setLocale('Norwegian (Nynorsk)');
writeoutput('#lsDateFormat(now(),"DDDD")#');
also produces: mandag
writeoutput('#lsDateFormat(now(),"DDDD")#');
produces: mandag
while
setLocale('Norwegian (Nynorsk)');
writeoutput('#lsDateFormat(now(),"DDDD")#');
also produces: mandag
icu4j on the otherhand produces:
måndag for nn_NO
mandag for nb_NO
it looks like ColdFusion got tripped up on the "variant instead of language" locale.
taking this a step further, doing a "FULL" date format shows up even larger differences between core java and icu4j:
core java
8. mai 2006 for no_NO
8. mai 2006 for no_NO_NY
icu4j
måndag 8. mai 2006 for nn_NO
mandag 8. mai 2006 for nb_NO
oops. to my way of thinking, a "FULL" date format should include the day name as well as the rest of the date (date in month, month and year). i really wish ColdFusion would use icu4j.
and the "A-Go-Go" reference? nothing to with g11n or ColdFusion, just been listening to a lot of Dengue Fever lately and that song has just stuck in my head ;-)
2 Comments:
Bokmål and Nynorsk are practically two dialects or versions of the same language. Read more at: http://en.wikipedia.org/wiki/Nynorsk
I always hated (and I'm not alone) having to learn two different ways of writing the same language in school :)
yeah but they're two *different* languages. that's my beef w/core java.
Post a Comment
<< Home