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

B10971-01

oracle.i18n.util
Class LocaleMapper

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

public class LocaleMapper
extends Object

This class does mappings between Oracle locale elements and equivalent locale elements in other vendors and standards. This class contains the same mapping data as the C NLSRTL library package oracle.gss.util


Field Summary
static int EMAIL_UNIX
          Constant value to represent Unix for email
static int EMAIL_WINDOWS
          Constant value to represent Windows for email
static int IANA
          Constant value to represent IANA
static int JAVA
          Constant value to represent JAVA
static int ORACLE
          Constant value to represent Oracle
static int UNIX
          Constant value to represent Unix for general
static int WINDOWS
          Constant value to represent Windows for general
 
Method Summary
static String[] getAvailableIANACharacterSets()
          Returns an array of all IANA character set names that has a corresponding Oracle Character set
static String[] getAvailableOraCharacterSets()
          Returns an array of all Oracle character set names that has a corresponding IANA character set
static String getIANACharacterSet(int from, String charset)
          Returns the IANA character set that is equivalent to the Oracle or Java Character set passed in
static String[] getIANACharSetFromLocale(int context, Locale locale)
          Returns commonly used IANA Character set based on the given context and locale.
static String[] getIANACharSetFromOraLang(int context, String oraLanguage)
          Returns commonly used IANA Character set based on the given context and Oracle language.
static String getJavaCharacterSet(int from, String charset)
          Returns the Java character set that is equivalent to the Oracle or IANA Character set passed in
static String getJavaLangFromOraLang(String lang)
          Returns Java language name given Oracle language name
static Locale getJavaLocale(String oraLanguage, String oraTerritory)
          Returns a Java Locale instance that is equivalent to the oracle locale specified by the passed in Oracle language and territory
static String getJavaTerrFromOraTerr(String terr)
          get Java territory name given Oracle territory name
static String getOraCharacterSet(int from, String charset)
          Returns the Oracle character set that is equivalent to the Java Character set passed in
static String[] getOraCharSetFromOraLang(int context, String oraLanguage)
          Returns commonly used Oracle Character set based on the given context and Oracle language.
static String getOraLangFromJavaLang(String lang)
          Returns Oracle language name given Java language name
static String getOraLanguage(Locale locale)
          Returns the Oracle language name based on given Java Locale
static String getOraLanguageFromShortName(String oraShortName)
          Returns the Oracle language name from the Oracle short language name
static String getOraTerrFromJavaTerr(String terr)
          Returns Oracle territory name given Java territory name
static String getOraTerritory(Locale locale)
          Returns the Oracle territory name given a Java Locale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE

public static final int ORACLE
Constant value to represent Oracle

See Also:
Constant Field Values

IANA

public static final int IANA
Constant value to represent IANA

See Also:
Constant Field Values

JAVA

public static final int JAVA
Constant value to represent JAVA

See Also:
Constant Field Values

EMAIL_WINDOWS

public static final int EMAIL_WINDOWS
Constant value to represent Windows for email

See Also:
Constant Field Values

EMAIL_UNIX

public static final int EMAIL_UNIX
Constant value to represent Unix for email

See Also:
Constant Field Values

WINDOWS

public static final int WINDOWS
Constant value to represent Windows for general

See Also:
Constant Field Values

UNIX

public static final int UNIX
Constant value to represent Unix for general

See Also:
Constant Field Values
Method Detail

getAvailableIANACharacterSets

public static String[] getAvailableIANACharacterSets()
Returns an array of all IANA character set names that has a corresponding Oracle Character set

Returns:
an array of String containing the list of IANA names.

getAvailableOraCharacterSets

public static String[] getAvailableOraCharacterSets()
Returns an array of all Oracle character set names that has a corresponding IANA character set

Returns:
an array of String containing the list of Oracle names.

getIANACharacterSet

public static String getIANACharacterSet(int from,
                                         String charset)
Returns the IANA character set that is equivalent to the Oracle or Java Character set passed in

Parameters:
from - can be ORACLE or JAVA
charset - character set name with which we want to find an equivalent IANA character set
Returns:
IANA character set name, null if not found

getJavaCharacterSet

public static String getJavaCharacterSet(int from,
                                         String charset)
Returns the Java character set that is equivalent to the Oracle or IANA Character set passed in

Parameters:
from - can be ORACLE or IANA
charset - character set name with which we want to find an equivalent Java character set
Returns:
Java character set name, null if not found

getOraCharacterSet

public static String getOraCharacterSet(int from,
                                        String charset)
Returns the Oracle character set that is equivalent to the Java Character set passed in

Parameters:
from - can be IANA or JAVA
charset - character set name with which we want to find an equivalent Oracle character set
Returns:
Oracle character set name, null if not found

getJavaLocale

public static Locale getJavaLocale(String oraLanguage,
                                   String oraTerritory)
Returns a Java Locale instance that is equivalent to the oracle locale specified by the passed in Oracle language and territory

Parameters:
oraLanguage - Oracle language
oraTerritory - Oracle territory
Returns:
Java Locale instance, defaults to American_America

getOraLanguageFromShortName

public static String getOraLanguageFromShortName(String oraShortName)
Returns the Oracle language name from the Oracle short language name

Parameters:
oraShortName - Oracle short language name
Returns:
Oracle language name

getOraLanguage

public static String getOraLanguage(Locale locale)
Returns the Oracle language name based on given Java Locale

Parameters:
locale - Java locale instance
Returns:
Oracle language name associated with the given locale, or null no corresponding Oracle language is found.

getOraTerritory

public static String getOraTerritory(Locale locale)
Returns the Oracle territory name given a Java Locale

Parameters:
locale - Java locale instance
Returns:
Oracle territory name associated with the given locale

getIANACharSetFromLocale

public static String[] getIANACharSetFromLocale(int context,
                                                Locale locale)
Returns commonly used IANA Character set based on the given context and locale. For example, an email application may need to use a different character set than a web application

Parameters:
context - can be EMAIL_WINDOWS, EMAIL_UNIX, WINDOWS, UNIX
locale - Java Locale
Returns:
Oracle territory name associated with the given locale

getIANACharSetFromOraLang

public static String[] getIANACharSetFromOraLang(int context,
                                                 String oraLanguage)
Returns commonly used IANA Character set based on the given context and Oracle language. For example, an email application may need to use a different character set than a web application

Parameters:
context - can be EMAIL_WINDOWS, EMAIL_UNIX, WINDOWS, UNIX
oraLanguage - Oracle language
Returns:
Oracle territory name associated with the given locale

getOraCharSetFromOraLang

public static String[] getOraCharSetFromOraLang(int context,
                                                String oraLanguage)
Returns commonly used Oracle Character set based on the given context and Oracle language. For example, an email application may need to use a different character set than a web application

Parameters:
context - can be EMAIL_WINDOWS, EMAIL_UNIX, WINDOWS, UNIX
oraLanguage - Oracle language
Returns:
Oracle territory name associated with the given locale

getOraLangFromJavaLang

public static String getOraLangFromJavaLang(String lang)
Returns Oracle language name given Java language name

Parameters:
lang - Java language name
Returns:
Oracle language name equivalent to the given Java language

getJavaLangFromOraLang

public static String getJavaLangFromOraLang(String lang)
Returns Java language name given Oracle language name

Parameters:
lang - Oracle language name
Returns:
Java language name equivalent to the given Oracle language

getOraTerrFromJavaTerr

public static String getOraTerrFromJavaTerr(String terr)
Returns Oracle territory name given Java territory name

Parameters:
terr - Java territory name
Returns:
Oracle territory name equivalent to the given Java territory

getJavaTerrFromOraTerr

public static String getJavaTerrFromOraTerr(String terr)
get Java territory name given Oracle territory name

Parameters:
terr - Oracle territory name
Returns:
Java territory name equivalent to the given Oracle territory

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

B10971-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.