Oracle® Globalization Development Kit Java API Reference
10g Release 1 (10.1.0.0)

Part No. B10971-02

oracle.i18n.util
Class OraLocaleInfo

java.lang.Object
  |
  +--oracle.i18n.util.OraLocaleInfo

public class OraLocaleInfo
extends Object

The OraLocaleInfo class is an Oracle locale class that includes the Oracle language, territory, and collator objects.

Since:
10.1.0.2

Method Summary
Object clone()
Overrides the clone method.
boolean equals(Object obj)
Overrides the equals method.
static String[] getAvailableCharacterSets()
Returns a list of the available Oracle character sets.
static String[] getAvailableCurrencies()
Returns a list of the available ISO 4217 currencies.
static String[] getAvailableLanguages()
Returns a list of the available Oracle languages.
static String[][] getAvailableLanguages(Locale translocale)
Returns the available language IDs along with their corresponding display names sorted in the translated display name order.
static String[] getAvailableLinguisticSorts()
Returns a list of the available Oracle linguistic sorts.
static String[] getAvailableLocale()
Returns the available Oracle locale list.
static String[] getAvailableTerritories()
Returns a list of the available Oracle territories.
static Locale[] getCommonLocales()
Returns the common locale list.
static Locale[] getCommonLocales(Locale translocale)
Returns the common locale lists that are sorted based on the given translation locale.
static String[] getCommonTimeZoneIDs()
Returns the common time zone IDs in an array.
static TimeZone[] getCommonTimeZones()
Returns the common time zone list.
String getCurrencySymbol()
Returns the currency symbol for this OraLocaleInfo instance.
static String getCurrencySymbol(String iso4217code)
Returns the currency symbol based on the given ISO 4217 code.
static oracle.i18n.util.OraLocaleInfo getDefault()
Returns the default OraLocaleInfo instance based on the Java default locale.
static oracle.i18n.util.OraLocaleInfo getInstance(Locale locale)
Constructs an Oracle locale from Java Locale object.
static oracle.i18n.util.OraLocaleInfo getInstance(String language, String territory)
Constructs an Oracle locale from Oracle language and territory.
static oracle.i18n.util.OraLocaleInfo getInstance(String language, String territory, String linguisticSort)
Constructs an Oracle locale from Oracle language, territory, and sorting rule.
String getLanguage()
Returns the Oracle language name for this OraLocaleInfo instance.
String getLinguisticSort()
Returns the Oracle linguistic sorting name for this OraLocaleInfo instance.
String[] getLocalCharacterSets()
Returns the common Oracle character sets based on the language of this OraLocaleInfo instance.
String[] getLocalCharacterSets(int platform)
Returns the common Oracle character sets based on the language of this OraLocaleInfo instance.
static String[] getLocalCharacterSets(String language)
Returns the common Oracle character sets based on the given language.
static String[] getLocalCharacterSets(String language, int platform)
Returns the common Oracle character sets based on the given language.
String[] getLocalCurrencies()
Returns the common ISO 4217 currency based on the territory of this OraLocaleInfo instance.
static String[] getLocalCurrencies(String territory)
Returns the common ISO 4217 currency based on the given territory.
Locale getLocale()
Returns the Java Locale corresponding to this object.
static Locale getLocaleFromString(String localestring)
Constructs a Java Locale object from the ISO locale string.
String[] getLocalLanguages()
Returns the common Oracle languages based on the territory of this OraLocaleInfo instance.
static String[] getLocalLanguages(String territory)
Returns the common Oracle languages based on the given territory.
String[] getLocalLinguisticSorts()
Returns the common linguistic sorts based on the language of this OraLocaleInfo instance.
static String[] getLocalLinguisticSorts(String language)
Returns the common linguistic sorts based on the given language.
String[] getLocalTerritories()
Returns the common Oracle territories based on the language of this OraLocaleInfo instance.
static String[] getLocalTerritories(String language)
Returns the common Oracle territories based on the given language.
TimeZone[] getLocalTimeZones()
Returns the common time zone list for the territory of this OraLocaleInfo instance.
static TimeZone[] getLocalTimeZones(String territory)
Returns the common time zone list for the given Oracle territory.
String getShortLanguage()
Returns Oracle short language name for this OraLocaleInfo instance.
int getStartDayOfTheWeek()
Returns the start day-of-the-week for the object.
static int getStartDayOfTheWeek(String territory)
Returns the start day of the week for the given Oracle territory for the object.
static int getStartDayOfTheWeek(String language, String territory)
Returns the start day of the week for the given Oracle language and Oracle territory for the object.
String getTerritory()
Returns the Oracle territory name for this OraLocaleInfo instance.
int getWritingDirection()
Returns the Oracle writing direction for this OraLocaleInfo instance.
int hashCode()
Overrides the hashCode method.
String toString()
Returns the string representation of this OraLocaleInfo instance.

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getInstance

public static oracle.i18n.util.OraLocaleInfo getInstance(String language,
String territory,
String linguisticSort)
Constructs an Oracle locale from Oracle language, territory, and sorting rule.
Parameters:
language - Oracle language
territory - Oracle territory
linguisticSort - Oracle linguistic sort rule name
Returns:
an OraLocaleInfo instance
Throws:
IllegalStateException - if the linguistic sort definition is broken

getInstance

public static oracle.i18n.util.OraLocaleInfo getInstance(String language,
String territory)
Constructs an Oracle locale from Oracle language and territory. Uses the default sorting rule for this locale.
Parameters:
language - Oracle or ISO language
territory - Oracle territory or ISO country, language and country must both be Oracle or both be ISO
Returns:
an OraLocaleInfo instance

getInstance

public static oracle.i18n.util.OraLocaleInfo getInstance(Locale locale)
Constructs an Oracle locale from Java Locale object.
Parameters:
locale - Java Locale object
Returns:
an OraLocaleInfo instance

getLocale

public Locale getLocale()
Returns the Java Locale corresponding to this object.
Returns:
Java Locale

getLanguage

public String getLanguage()
Returns the Oracle language name for this OraLocaleInfo instance.
Returns:
the Oracle language name

getTerritory

public String getTerritory()
Returns the Oracle territory name for this OraLocaleInfo instance.
Returns:
the Oracle territory name

getLinguisticSort

public String getLinguisticSort()
Returns the Oracle linguistic sorting name for this OraLocaleInfo instance.
Returns:
the Oracle linguistic name

getWritingDirection

public int getWritingDirection()
Returns the Oracle writing direction for this OraLocaleInfo instance.
Returns:
the writing direction: 0 = LEFT to RIGHT, 1=RIGHT to LEFT

getShortLanguage

public String getShortLanguage()
Returns Oracle short language name for this OraLocaleInfo instance.
Returns:
a short Oracle language name

getLocalCharacterSets

public String[] getLocalCharacterSets()
Returns the common Oracle character sets based on the language of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCharacterSet method to find its translation.

Note the common character sets vary among platforms. This method returns the list for Unix platforms.

Returns:
an array of character sets that are commonly used

getLocalCharacterSets

public String[] getLocalCharacterSets(int platform)
Returns the common Oracle character sets based on the language of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCharacterSet method to find its translation.

Note the common character sets vary among platforms.

Parameters:
platform - either LocaleMapper.UNIX or LocaleMapper.WINDOWS to specify the platform
Returns:
an array of character sets that are commonly used

getLocalCharacterSets

public static String[] getLocalCharacterSets(String language)
Returns the common Oracle character sets based on the given language. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCharacterSet method to find its translation.

Note the common character sets vary among platforms. This method returns the list for Unix platforms.

Parameters:
language - Oracle language
Returns:
an array of character sets that are commonly used

getLocalCharacterSets

public static String[] getLocalCharacterSets(String language,
int platform)
Returns the common Oracle character sets based on the given language. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCharacterSet method to find its translation.

Note the common character sets vary among platforms.

Parameters:
language - Oracle language
platform - either LocaleMapper.UNIX or LocaleMapper.WINDOWS to specify the platform
Returns:
an array of character sets that are commonly used



getLocalLinguisticSorts

public static String[] getLocalLinguisticSorts(String language)
Returns the common linguistic sorts based on the given language. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayLinguisticSort method to find its translation.
Parameters:
language - Oracle language
Returns:
an array of linguistic sorting names that are commonly used

getLocalLinguisticSorts

public String[] getLocalLinguisticSorts()
Returns the common linguistic sorts based on the language of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayLinguisticSort method to find its translation.
Returns:
an array of linguistic sorting names that are commonly used

getLocalCurrencies

public static String[] getLocalCurrencies(String territory)
Returns the common ISO 4217 currency based on the given territory. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCurrency method to find its translation.
Parameters:
territory - Oracle territory
Returns:
ISO currency symbols

getLocalCurrencies

public String[] getLocalCurrencies()
Returns the common ISO 4217 currency based on the territory of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayCurrency method to find its translation.
Returns:
ISO 4217 currency codes

getCurrencySymbol

public static String getCurrencySymbol(String iso4217code)
Returns the currency symbol based on the given ISO 4217 code.
Parameters:
iso4217code - ISO 4217 currency code
Returns:
a currency symbol

getCurrencySymbol

public String getCurrencySymbol()
Returns the currency symbol for this OraLocaleInfo instance.
Returns:
a currency symbol

getLocalTerritories

public String[] getLocalTerritories()
Returns the common Oracle territories based on the language of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayTerritory mehtod to find its translation.
Returns:
an array of territories that are commonly used

getLocalTerritories

public static String[] getLocalTerritories(String language)
Returns the common Oracle territories based on the given language. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayTerritory method to find its translation.
Parameters:
language - Oracle language
Returns:
an array of territories that are commonly used

getLocalLanguages

public String[] getLocalLanguages()
Returns the common Oracle languages based on the territory of this OraLocaleInfo instance. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayLanguage method to find its translation.
Returns:
an array of languages that are commonly used

getLocalLanguages

public static String[] getLocalLanguages(String territory)
Returns the common Oracle languages based on the given territory. The return strings are in English. Using the string, you can use the OraDisplayLocaleInfo.getDisplayLanguage method to find its translation.
Parameters:
territory - Oracle territory
Returns:
an array of languages that are commonly used

getLocalTimeZones

public static TimeZone[] getLocalTimeZones(String territory)
Returns the common time zone list for the given Oracle territory.
Parameters:
territory - Oracle territory name
Returns:
a common TimeZone object list

getLocalTimeZones

public TimeZone[] getLocalTimeZones()
Returns the common time zone list for the territory of this OraLocaleInfo instance.
Returns:
a common TimeZone object list

getAvailableLocale

public static String[] getAvailableLocale()
Returns the available Oracle locale list.
Returns:
a list of Oracle locales in <Oracle language>_<Oracle territory> form

getCommonTimeZones

public static TimeZone[] getCommonTimeZones()
Returns the common time zone list. This is independent from locales.
Returns:
a common TimeZone object list

getCommonTimeZoneIDs

public static String[] getCommonTimeZoneIDs()
Returns the common time zone IDs in an array. This is independent from locales.
Returns:
a common time zone ID array

getCommonLocales

public static Locale[] getCommonLocales()
Returns the common locale list.
Returns:
a common Java Locale object list

getCommonLocales

public static Locale[] getCommonLocales(Locale translocale)
Returns the common locale lists that are sorted based on the given translation locale.
Parameters:
translocale - the translation locale
Returns:
a common Java Locale object list

getAvailableLanguages

public static String[] getAvailableLanguages()
Returns a list of the available Oracle languages.
Returns:
an array of Oracle languages



getAvailableTerritories

public static String[] getAvailableTerritories()
Returns a list of the available Oracle territories.
Returns:
an array of Oracle territories



getAvailableCharacterSets

public static String[] getAvailableCharacterSets()
Returns a list of the available Oracle character sets.
Returns:
an array of Oracle character sets

getAvailableCurrencies

public static String[] getAvailableCurrencies()
Returns a list of the available ISO 4217 currencies.
Returns:
an array of ISO 4217 currencies

getAvailableLinguisticSorts

public static String[] getAvailableLinguisticSorts()
Returns a list of the available Oracle linguistic sorts.
Returns:
an array of Oracle linguistic sorts



getStartDayOfTheWeek

public int getStartDayOfTheWeek()
Returns the start day-of-the-week for the object. It is indicated by a number of 0 through 6.
Returns:
the start day-of-the-week

getStartDayOfTheWeek

public static int getStartDayOfTheWeek(String territory)
Returns the start day of the week for the given Oracle territory for the object. It is indicated by a number of 0 through 6.
Parameters:
territory - the given Oracle territory name
Returns:
the start day of the week

getStartDayOfTheWeek

public static int getStartDayOfTheWeek(String language,
String territory)
Returns the start day of the week for the given Oracle language and Oracle territory for the object. It is indicated by a number of 0 through 6.
Parameters:
language - the given Oracle language name
territory - the given Oracle territory name
Returns:
the start day of the week

clone

public Object clone()
Overrides the clone method.
Overrides:
clone in class Object
Returns:
a copy of this OraLocaleInfo instance
Throws:
IllegalStateException - if the OraCollator object is invalid

equals

public boolean equals(Object obj)
Overrides the equals method.
Overrides:
equals in class Object
Parameters:
obj - a target object to compare
Returns:
true if equal or false if not

getDefault

public static oracle.i18n.util.OraLocaleInfo getDefault()
Returns the default OraLocaleInfo instance based on the Java default locale.
Returns:
an OraLocaleInfo instance

toString

public String toString()
Returns the string representation of this OraLocaleInfo instance.
Overrides:
toString in class Object
Returns:
a string

hashCode

public int hashCode()
Overrides the hashCode method.
Overrides:
hashCode in class Object
Returns:
a hash value

getLocaleFromString

public static Locale getLocaleFromString(String localestring)
Constructs a Java Locale object from the ISO locale string.

Either a dash (U+002D) or an underscore (U+005F) can be used to connect ISO 639 and ISO 3166 codes.

Parameters:
localestring - the string representing an ISO locale. For example, ja-JP represents the Japanese language used in Japan. The connector of ISO 639 and ISO 3166 codes can be either "-" or "_".
Returns:
an Java Locale object

Oracle® Globalization Development Kit Java API Reference
10g Release 1 (10.1.0.0)

Part No. B10971-02

Copyright © 2003, 2004, Oracle. All rights reserved.