Lines Matching refs:language

85  *   <dt><a name="def_language"/><b>language</b></dt>
87 * <dd>ISO 639 alpha-2 or alpha-3 language code, or registered
88 * language subtags up to 8 alpha letters (for future enhancements).
89 * When a language has both an alpha-2 code and an alpha-3 code, the
91 * language codes in the IANA Language Subtag Registry (search for
92 * "Type: language"). The language field is case insensitive, but
95 * <dd>Well-formed language values have the form
97 * BCP47 language production, since it excludes extlang. They are
98 * not needed since modern three-letter language codes replace
141 * additional variations that define a language or its dialects that
142 * are not covered by any combinations of language, script and
148 * language variations. For example, some supported variants
152 * language, is supported by extension subtags or private use
165 * extensions apart from language identification. The extensions in
190 * <h4><a name="def_locale_extension">Unicode locale/language extension</h4>
245 * {@link #Locale(String language)}
246 * {@link #Locale(String language, String country)}
247 * {@link #Locale(String language, String country, String variant)}
251 * with language, country and variant, but you cannot specify
257 * object for a well-formed BCP 47 language tag.
275 * code and <code>getLanguage</code> to get the language code.
279 * the language suitable for displaying to the user. Interestingly,
319 * of toString into language, country, and variant fields can continue
326 * between some Locales and BCP 47 language tags cannot be made without
328 * represent the state of locales whose language, country, or variant
371 * <h5>Legacy language codes</h5>
373 * <p>Locale's constructor has always converted three language codes to
379 * <p>The APIs added in 1.7 map between the old and new language codes,
382 * code), but using the new codes in the BCP 47 language tag APIs (so
389 * <h5>Three-letter language/country(region) codes</h5>
391 * <p>The Locale constructors have always specified that the language
394 * been relaxed to allow language codes of two to eight characters and
396 * particular, three-letter language codes and three-digit region
413 /** Useful constant for language.
417 /** Useful constant for language.
421 /** Useful constant for language.
425 /** Useful constant for language.
429 /** Useful constant for language.
433 /** Useful constant for language.
437 /** Useful constant for language.
441 /** Useful constant for language.
445 /** Useful constant for language.
499 * language, country, and variant are empty ("") strings. This is regarded
500 * as the base locale of all locales, and is used as the language/country
546 * Construct a locale from language, country and variant.
547 * This constructor normalizes the language value to lowercase and
552 * <li>ISO 639 is not a stable standard; some of the language codes it defines
562 * @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
564 * valid language values.
571 public Locale(String language, String country, String variant) {
572 if (language== null || country == null || variant == null) {
575 baseLocale = BaseLocale.getInstance(convertOldISOCodes(language), "", country, variant);
576 localeExtensions = getCompatibilityExtensions(language, "", country, variant);
580 * Construct a locale from language and country.
581 * This constructor normalizes the language value to lowercase and
586 * <li>ISO 639 is not a stable standard; some of the language codes it defines
594 * @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
596 * valid language values.
601 public Locale(String language, String country) {
602 this(language, country, "");
606 * Construct a locale from a language code.
607 * This constructor normalizes the language value to lowercase.
611 * <li>ISO 639 is not a stable standard; some of the language codes it defines
619 * @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
621 * valid language values.
625 public Locale(String language) {
626 this(language, "", "");
640 * <code>language</code>, <code>country</code> and
646 * @param language lowercase 2 to 8 language code.
652 static Locale getInstance(String language, String country, String variant) {
653 return getInstance(language, "", country, variant, null);
656 static Locale getInstance(String language, String script, String country,
658 if (language== null || script == null || country == null || variant == null) {
663 extensions = getCompatibilityExtensions(language, script, country, variant);
666 BaseLocale baseloc = BaseLocale.getInstance(language, script, country, variant);
784 String language, region, script, country, variant;
785 language = AccessController.doPrivileged(
786 new GetPropertyAction("user.language", "en"));
809 defaultLocale = getInstance(language, script, country, variant, null);
844 * method is called with a <code>PropertyPermission("user.language", "write")</code>
878 * with a PropertyPermission("user.language", "write") permission before
910 ("user.language", "write"));
956 * Returns a list of all 2-letter language codes defined in ISO 639.
964 * <li>The <code>Locale</code> class also supports language codes up to
988 * Returns the language code of this Locale.
993 * want to check for a specific language whose code has changed, don't do
1003 * @return The language code, or the empty string if none is defined.
1156 * object, consisting of language, country, variant, script,
1159 * language + "_" + country + "_" + (variant + "_#" | "#") + script + "-" + extensions
1169 * <p>If both the language and country fields are missing, this function will return
1172 * language or country code).
1178 * previous uses of <code>toString</code> that expected language, country, and variant
1231 * Returns a well-formed IETF BCP 47 language tag representing
1234 * <p>If this <code>Locale</code> has a language, country, or
1235 * variant that does not satisfy the IETF BCP 47 language tag
1239 * <p><b>Language:</b> If language is empty, or not <a
1270 * representations, including deprecated ISO language codes,
1275 * <li>Deprecated ISO language codes "iw", "ji", and "in" are
1278 * <li>A locale with language "no", country "NO", and variant
1280 * to a language tag "nn-NO".</li></ul>
1282 * <p><b>Note:</b> Although the language tag created by this
1285 * necessarily a valid BCP 47 language tag. For example,
1289 * will return "xx-YY", but the language subtag "xx" and the
1293 * @return a BCP47 language tag representing the locale
1345 * Returns a locale for the specified IETF BCP 47 language tag string.
1347 * <p>If the specified language tag contains any ill-formed subtags,
1354 * <li>The language code "und" is mapped to language "".
1356 * <li>The language codes "he", "yi", and "id" are mapped to "iw",
1377 * the first such subtag is used as the language, and the primary
1378 * language subtag and other extlang subtags are ignored:
1403 * private use language tags. Stand alone private use tags are
1404 * represented as empty language and extension 'x-whatever',
1457 * @param languageTag the language tag
1458 * @return The locale that best represents the language tag.
1478 * Returns a three-letter abbreviation of this locale's language.
1479 * If the language matches an ISO 639-1 two-letter code, the
1481 * returned. The ISO 639-2 language codes can be found on-line,
1484 * language, the language is returned as is. If the locale does
1485 * not specify a language the empty string is returned.
1487 * @return A three-letter abbreviation of this locale's language.
1489 * three-letter language abbreviation is not available for this locale.
1499 throw new MissingResourceException("Couldn't find 3-letter language code for "
1549 * Returns a name for the locale's language that is appropriate for display to the
1558 * value. If the locale doesn't specify a language, this function returns the empty string.
1565 * Returns a name for the locale's language that is appropriate for display to the
1574 * on the ISO code as a last-resort value. If the locale doesn't specify a language,
1726 * language (script, country, variant)<br>
1727 * language (country)<br>
1728 * language (variant)<br>
1733 * language, sacript, country, and variant fields are all empty,
1748 * language (script, country, variant)<br>
1749 * language (country)<br>
1750 * language (variant)<br>
1755 * language, script, country, and variant fields are all empty,
1785 // The main name is the language, or if there is no language, the script,
1786 // then if no script, the country. If there is no language/script/country
1830 // efficient since all the language-only locales will not have any
1888 * deemed equal to another Locale with identical language, script, country,
2008 * @serialField language String
2009 * language subtag in lower case. (See <a href="java/util/Locale.html#getLanguage()">getLanguage()</a>)
2027 new ObjectStreamField("language", String.class),
2043 fields.put("language", baseLocale.getLanguage());
2062 String language = (String)fields.get("language", "");
2067 baseLocale = BaseLocale.getInstance(convertOldISOCodes(language), script, country, variant);
2084 * language, country and variant fields read from the object data stream
2104 private static String convertOldISOCodes(String language) {
2107 language = LocaleUtils.toLowerString(language).intern();
2108 if (language == "he") {
2110 } else if (language == "yi") {
2112 } else if (language == "id") {
2115 return language;
2119 private static LocaleExtensions getCompatibilityExtensions(String language,
2125 if (LocaleUtils.caseIgnoreMatch(language, "ja")
2131 } else if (LocaleUtils.caseIgnoreMatch(language, "th")
2189 DISPLAY("user.language.display",
2198 FORMAT("user.language.format",
2222 * well-formed and can be transformed to a well-formed IETF BCP 47 language tag
2233 * transformed to a BCP 47 language tag.
2292 * language tag. Discards the existing state. Null and the
2296 * form before being processed. Otherwise, the language tag
2302 * @param languageTag the language tag
2318 * Sets the language. If <code>language</code> is the empty string or
2319 * null, the language in this <code>Builder</code> is removed. Otherwise,
2320 * the language must be <a href="./Locale.html#def_language">well-formed</a>
2323 * <p>The typical language value is a two or three-letter language
2326 * @param language the language
2328 * @throws IllformedLocaleException if <code>language</code> is ill-formed
2330 public Builder setLanguage(String language) {
2332 localeBuilder.setLanguage(language);