Internationalization and localization tools


Locale-Sensitive Java Method

java.util.TimeZone

public final String getDisplayName()

public final String getDisplayName(Locale locale)

public final String getDisplayName(boolean daylight,
    int style)

public String getDisplayName(boolean daylight,
    int style,
    Locale locale)

Internationalization (I18n) Method Overview

getDisplayName returns a name of this time zone suitable for presentation to the user in the default (or specified) locale.

For more information on getDisplayName, click here.

I18n Issues

The default machine locale is not always the correct locale for every user. Hence, it is recommended I18n practice to call the factory method that takes a both a style and locale argument, allowing the code to format a time zone independently of the machine's default locale.

Globalyzer will detect this method and report it as an I18n issue regardless of the signature used and regardless of whether it is being used correctly. If Locale is already being passed as an argument, Globalyzer will detect it to force developers to double check that the correct Locale is being passed. If you have determined that the call is being handled correctly, you can use Globalyzer's Ignore Comment functionality to ensure that it isn't picked up in a subsequent scan.

Please see Numbers for more information.

Locale-Sensitive Java Methods

 

Lingoport internationalization and localization services and software