ULocale#toLanguageTag(): "und" language tag with private use

Description

Deleted Component: misc

ULocale#toLanguageTag() should not supply "und" as language when the locale has only private use.

ULocale#toLanguageTag() automatically add "und" as the language subtag when the instance of ULocale has no language. BCP 47 language tag requires a language subtag - except for the case where only private use is available. The current implementation always add "und" when language is absent even if private use is available.

Above code currently returns "und-x-elmer", but it should return "x-elmer" instead.

Activity

Show:
TracBot
June 30, 2018, 11:42 PM
Trac Comment 2 by —2011-02-02T19:42:48.983Z

should also be merged into 4.6.1.

TracBot
June 30, 2018, 11:42 PM
Trac Comment 5 by —2011-04-08T00:49:17.083Z

Shortened summary field.

TracBot
June 30, 2018, 11:42 PM
Trac Comment 6 by —2016-10-05T23:13:36.787Z

Milestone 4.7.1 deleted

Fixed

Assignee

Yoshito Umaoka

Reporter

Yoshito Umaoka

Components

None

Labels

None

Reviewer

None

Priority

major

Time Needed

Hours

Fix versions