JDK-4400849 : RFE: Locale.getDisplayName translation for Portuguese
  • Type: Enhancement
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2000-12-27
  • Updated: 2005-10-10
  • Resolved: 2005-10-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b56Fixed
Related Reports
Relates :  
Relates :  
Description
Name: boT120536			Date: 12/27/2000


Results are identical with 1.2.2 and 1.3, to wit:

% java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

% java -version
java version "1.2.2"
Java HotSpot(TM) Server VM (2.0fcs, mixed mode, build E)


Consider the set of java.util.Locale objects representing
English, French, Italian, German, Spanish and Portuguese (Brazillian)

A call to getDisplayName(inLocale) returns localized language names
only for English and French.  For German, it returns localized names
for all but French.  For the other languages, only the language
name itself is translated.

It appears that the i18n.jar that is shipped with the internationalized JDK/JRE
1.2.2 and 1.3.0 do not include the translated strings.

This causes concern among our European customers.

See the following program and its output.

import java.util.Locale;

public class LocaleNames {
  public static void main(String args[]) {
    Locale spanish = new Locale("es", "");
    Locale brazillian_portuguese = new Locale("pt", "br");

    // this could be written as a pair of loops but writing it like this
    // makes it blindingly obvious what's going on.
    test(Locale.US, Locale.US);
    test(Locale.US, Locale.FRANCE);
    test(Locale.US, Locale.GERMANY);
    test(Locale.US, Locale.ITALIAN);
    test(Locale.US, spanish);
    test(Locale.US, brazillian_portuguese);
    System.out.println();
    test(Locale.FRANCE, Locale.US);
    test(Locale.FRANCE, Locale.FRANCE);
    test(Locale.FRANCE, Locale.GERMANY);
    test(Locale.FRANCE, Locale.ITALIAN);
    test(Locale.FRANCE, spanish);
    test(Locale.FRANCE, brazillian_portuguese);
    System.out.println();
    test(Locale.GERMANY, Locale.US);
    test(Locale.GERMANY, Locale.FRANCE);
    test(Locale.GERMANY, Locale.GERMANY);
    test(Locale.GERMANY, Locale.ITALIAN);
    test(Locale.GERMANY, spanish);
    test(Locale.GERMANY, brazillian_portuguese);
    System.out.println();
    test(Locale.ITALIAN, Locale.US);
    test(Locale.ITALIAN, Locale.FRANCE);
    test(Locale.ITALIAN, Locale.GERMANY);
    test(Locale.ITALIAN, Locale.ITALIAN);
    test(Locale.ITALIAN, spanish);
    test(Locale.ITALIAN, brazillian_portuguese);
    System.out.println();
    test(spanish, Locale.US);
    test(spanish, Locale.FRANCE);
    test(spanish, Locale.GERMANY);
    test(spanish, Locale.ITALIAN);
    test(spanish, spanish);
    test(spanish, brazillian_portuguese);
    System.out.println();
    test(brazillian_portuguese, Locale.US);
    test(brazillian_portuguese, Locale.FRANCE);
    test(brazillian_portuguese, Locale.GERMANY);
    test(brazillian_portuguese, Locale.ITALIAN);
    test(brazillian_portuguese, spanish);
    test(brazillian_portuguese, brazillian_portuguese);
  }

  static void test(Locale inLocale, Locale nameToPrint) {
    System.out.println("In " + inLocale.getDisplayLanguage() + ", " +
nameToPrint.getDisplayLanguage() + " translates to " +
nameToPrint.getDisplayLanguage(inLocale));
  }
}

% java LocaleNames
In English, English translates to English
In English, French translates to French
In English, German translates to German
In English, Italian translates to Italian
In English, Spanish translates to Spanish
In English, Portuguese translates to Portuguese

In French, English translates to anglais
In French, French translates to fran?ais
In French, German translates to allemand
In French, Italian translates to italien
In French, Spanish translates to espagnol
In French, Portuguese translates to portugais

In German, English translates to Englisch
In German, French translates to French
In German, German translates to Deutsch
In German, Italian translates to Italienisch
In German, Spanish translates to Spanisch
In German, Portuguese translates to Portugiesisch

In Italian, English translates to English
In Italian, French translates to French
In Italian, German translates to German
In Italian, Italian translates to italiano
In Italian, Spanish translates to Spanish
In Italian, Portuguese translates to Portuguese

In Spanish, English translates to English
In Spanish, French translates to French
In Spanish, German translates to German
In Spanish, Italian translates to Italian
In Spanish, Spanish translates to espa?ol
In Spanish, Portuguese translates to Portuguese

In Portuguese, English translates to English
In Portuguese, French translates to French
In Portuguese, German translates to German
In Portuguese, Italian translates to Italian
In Portuguese, Spanish translates to Spanish
In Portuguese, Portuguese translates to portugu?s
(Review ID: 111387) 
======================================================================

Comments
EVALUATION The full set of language and country names have been translated into Catalan, Chinese (Simplified and Traditional), French, German, Italian, Japanese, Korean, Polish, Russian, Spanish, Swedish, and Thai for 1.3/Solaris and will be available on all platforms starting with Ladybird. Of the languages mentioned in the description, that leaves Portuguese to be done. norbert.lindenberg@Eng 2001-01-05 The following property file should be updated to include translations for language names and country names: src/share/classes/sun/text/resources/LocaleElements_pt.java ###@###.### 2002-02-14 We currently have no plan to localize into Portuguese. ###@###.### 2002-07-09 Still no plan to localize into Portuguese. ###@###.### 2003-07-28 Third party can translate locale data for Portuguese with the following RFE. 4052440 RFE: Pluggable locale support ###@###.### 2005-03-22 19:22:49 GMT It probably makes sense to import more complete sets of language and country names for those languages that the JRE claims to support from the CLDR. This has become more important since the pluggable locales project (4052440) removed the default locale fall back behavior in the Locale.getDisplayLanguage(Locale) and Locale.getDisplayCountry(Locale) methods. One problem is that the JRE and CLDR use different capitalization rules for a number of languages, so simply importing the CLDR language names could lead to regressions. I've filed CLDR bug 723 to resolve this issue (see http://www.jtcsv.com/cgibin/locale-bugs). ###@###.### 2005-05-25 02:46:27 GMT
25-05-2005