Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

oracle.dss.util.xdo.common.lang
Class LocaleUtil

java.lang.Object
  extended by oracle.dss.util.xdo.common.lang.LocaleUtil

public class LocaleUtil
extends java.lang.Object


Field Summary
static java.lang.String RCS_ID
           
 
Constructor Summary
LocaleUtil()
           
 
Method Summary
static java.lang.String getCountry(java.lang.String locale)
          returns Country portion of locale string.
static java.lang.String getDefaultLocaleString()
          returns default locale string.
static java.lang.String getLanguage(java.lang.String locale)
           
static java.util.Locale getLocale(java.lang.String locale)
          parse a locale based on given string since the since could contains "-" or "_", so we need to parse it by ourselves instead of using java.util.Locale's logic
static java.lang.String getLocaleString(java.util.Locale locale)
          Returns a RFC3066 locale string corresponding to the specified java locale.
static java.lang.String getVariant(java.lang.String locale)
          returns Variant portion of locale string.
static boolean isArabic(java.lang.String locale)
          returns whether input locale is arabic language or not.
static boolean isBidi(java.lang.String locale)
          returns whether input locale is bidi language or not.
static boolean isHebrew(java.lang.String locale)
          returns whether input locale is hebrew language or not.
static boolean isJapanese(java.lang.String locale)
          Returns ture if the specified locale is Japanese locale.
static boolean isKorean(java.lang.String locale)
          Returns ture if the specified locale is Korean locale.
static boolean isLatin1(java.lang.String locale)
          Returns ture if the specified locale is latin1 locale.
static boolean isSimplifiedChinese(java.lang.String locale)
          Returns ture if the specified locale is Simplified Chinese locale.
static boolean isTraditionalChinese(java.lang.String locale)
          Returns ture if the specified locale is Traditional Chinese locale.
static java.lang.String validate(java.lang.String locale)
          Validate the specified locale string and returns the corrected RFC3066 locale string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values
Constructor Detail

LocaleUtil

public LocaleUtil()
Method Detail

getLanguage

public static final java.lang.String getLanguage(java.lang.String locale)

getCountry

public static final java.lang.String getCountry(java.lang.String locale)
returns Country portion of locale string. If the input locale is not valid or does not contain country info, it returns null.
Note: This method does not validate the language contents. It just parses locale string.

Parameters:
locale - ... locale String
Returns:
country string

getVariant

public static final java.lang.String getVariant(java.lang.String locale)
returns Variant portion of locale string. If the input locale is not valid or does not contain country info, it returns null.
Note: This method does not validate the language contents. It just parses locale string.

Parameters:
locale - ... locale String
Returns:
country string

validate

public static java.lang.String validate(java.lang.String locale)
Validate the specified locale string and returns the corrected RFC3066 locale string. For example, validate("ja_JP") returns "ja-JP". You can get a correct RFC3066 locale string from a Java locale string using this method. Note) This method does not validate the language code or country code but validate the format of the locale string.

Returns:
RFC3066 locale string

isBidi

public static final boolean isBidi(java.lang.String locale)
returns whether input locale is bidi language or not.

Parameters:
locale - ... locale String
Returns:
true if the input locale is bidi language

isArabic

public static final boolean isArabic(java.lang.String locale)
returns whether input locale is arabic language or not.

Parameters:
locale - ... locale String
Returns:
true if the input locale is arabic language

isHebrew

public static final boolean isHebrew(java.lang.String locale)
returns whether input locale is hebrew language or not.

Parameters:
locale - ... locale String
Returns:
true if the input locale is hebrew language

getDefaultLocaleString

public static final java.lang.String getDefaultLocaleString()
returns default locale string. Default string depends on system locale.

Returns:
locale string

getLocaleString

public static final java.lang.String getLocaleString(java.util.Locale locale)
Returns a RFC3066 locale string corresponding to the specified java locale.

Parameters:
locale - java locale
Returns:
locale string

getLocale

public static final java.util.Locale getLocale(java.lang.String locale)
parse a locale based on given string since the since could contains "-" or "_", so we need to parse it by ourselves instead of using java.util.Locale's logic

Parameters:
locale - the RFC3066 locale in a java.lang.String
Returns:
the parsed java.util.Locale object

isLatin1

public static final boolean isLatin1(java.lang.String locale)
Returns ture if the specified locale is latin1 locale.

Parameters:
locale - locale string
Returns:

isSimplifiedChinese

public static final boolean isSimplifiedChinese(java.lang.String locale)
Returns ture if the specified locale is Simplified Chinese locale.

Parameters:
locale - locale string
Returns:

isTraditionalChinese

public static final boolean isTraditionalChinese(java.lang.String locale)
Returns ture if the specified locale is Traditional Chinese locale.

Parameters:
locale - locale string
Returns:

isJapanese

public static final boolean isJapanese(java.lang.String locale)
Returns ture if the specified locale is Japanese locale.

Parameters:
locale - locale string
Returns:

isKorean

public static final boolean isKorean(java.lang.String locale)
Returns ture if the specified locale is Korean locale.

Parameters:
locale - locale string
Returns:

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1)

E12063-04

Copyright © 1997, 2010, Oracle. All rights reserved.