*
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
*/
public String toLanguageTag() {
BaseLocale base = base();
LocaleExtensions exts = extensions();
if (base.getVariant().equalsIgnoreCase("POSIX")) {
// special handling for variant POSIX
base = BaseLocale.getInstance(base.getLanguage(), base.getScript(), base.getRegion(), "");
if (exts.getUnicodeLocaleType("va") == null) {
// add va-posix
InternalLocaleBuilder ilocbld = new InternalLocaleBuilder();
try {
ilocbld.setLocale(BaseLocale.ROOT, exts);