LanguageLocale { public static LanguageLocale fromString(String languageName) { if (!LOCALES.containsKey(languageName)) { synchronized (LOCALES) { if (!LOCALES.containsKey(languageName)) { LOCALES.put(languageName, new LanguageLocale(languageName)); } } } return LOCALES.get(languageName); } private  LanguageLocale(String languageTag); static LanguageLocale fromString(String languageName); static String makeLanguageName(String language, String script); boolean weaklyEqual(LanguageLocale target); String getName(); String getISO3LetterName(); final String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testDisplayNameInToString() { LanguageLocale l = LanguageLocale.fromString("pag"); System.out.println(l); System.out.println(LanguageLocale.fromString("ind")); System.out.println(LanguageLocale.fromString("dzo")); }
@Test public void testScriptFromRegion() { LanguageLocale withRegion = LanguageLocale.fromString("zh-TW"); LanguageLocale withScript = LanguageLocale.fromString("zh-Hant"); assertEquals(withRegion, withScript); withScript = LanguageLocale.fromString("zho-Hant"); assertEquals(withRegion, withScript); }