[threeten-dev] ZoneId.getText() and generic name

Masayoshi Okutsu masayoshi.okutsu at oracle.com
Thu Dec 20 01:29:36 PST 2012


On 12/20/2012 5:05 PM, Xueming Shen wrote:
> The change to support the generic zone name in ZoneId.getText(...)
>
> http://cr.openjdk.java.net/~sherman/jdk8_threeten/zidtext
>
> Naoto, Masayoshi,
>
> Is it possible to have a
>
> TimeZoneNameUtility.retrieveDispalyNamesExt(id, locale);
>
> to have the generic names attached to the id/std/dst list?
> preferred cached as well:-)

Yes, it's possible, but I prefer not to cache resources in JSR 310. 
Naoto is cleaning up/improving caches.

> btw, the generic names in cldr are not translated? I tried
> the Japanese locale, it appears they are all English, while
> the std/dst are translated. Or did I do anything wrong?

The generic names in JRE are not translated. There are some differences 
between the legacy JRE localized time zone names and CLDR ones. I 
"invented" generic names in English, but will need to request 
translation of generic time zone names.

If you specify CLDR as the source of localized resources, you should get 
translated generic names. That is, specify -Djava.locale.providers=CLDR.

Thanks,
Masayoshi



More information about the threeten-dev mailing list