[loc-en-dev] Locale Display Name with script
Doug Felt
dougfelt at google.com
Fri Mar 6 10:42:51 PST 2009
Yes, sorry about being imprecise. That's one of the ways in which this is a
Locale builder and not a 'BCP 47 langtag builder'.
Thanks for the clarification Yoshito.
Doug
On Fri, Mar 6, 2009 at 10:30 AM, Yoshito Umaoka <y.umaoka at gmail.com> wrote:
> Doug Felt wrote:
>
>> The builder defaults language to 'und'
>>
>> Hmmm.. I think I should clarify this..
> Builder defaults language to empty string, but when you convert it to a
> language tag, "und" is used. For example,
>
> Locale loc = new Builder().setRegion("US").create();
> String locStr = loc.toString();
> String langtag = loc.toLanguageTag();
>
>
> In this code,
>
> locStr -> _US
> langtag -> und-us
>
> If we want to avoid this, one possible option is to mandate non-empty
> language in Builder#create(). But, we cannot use IllegalArgumentException
> here obviously!
>
> -Yoshito
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/locale-enhancement-dev/attachments/20090306/d4e0eb12/attachment.html
More information about the locale-enhancement-dev
mailing list