com.atlassian.core.util
Class LocaleUtils

java.lang.Object
  extended by com.atlassian.core.util.LocaleUtils

public class LocaleUtils
extends java.lang.Object


Field Summary
 java.util.List installedLocales
           
static java.lang.String LANGUAGE_DESCRIPTOR_FILENAME
           
static java.lang.String LOCALE_TAG_NAME
           
 
Constructor Summary
LocaleUtils()
           
 
Method Summary
 java.util.List getInstalledLocales()
          This method locates all installed language bundles that are found on the classpath by looking for LANGUAGE_DESCRIPTOR_FILENAME files on the classpath, and parsing the value of the LOCALE_TAG_NAME element.
 java.util.Locale getLocale(java.lang.String locale)
          Creates a locale from the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANGUAGE_DESCRIPTOR_FILENAME

public static final java.lang.String LANGUAGE_DESCRIPTOR_FILENAME
See Also:
Constant Field Values

LOCALE_TAG_NAME

public static final java.lang.String LOCALE_TAG_NAME
See Also:
Constant Field Values

installedLocales

public java.util.List installedLocales
Constructor Detail

LocaleUtils

public LocaleUtils()
Method Detail

getInstalledLocales

public java.util.List getInstalledLocales()
                                   throws java.io.IOException
This method locates all installed language bundles that are found on the classpath by looking for LANGUAGE_DESCRIPTOR_FILENAME files on the classpath, and parsing the value of the LOCALE_TAG_NAME element.

Throws:
java.io.IOException - when problems arise retrieving resources from the classpath

getLocale

public java.util.Locale getLocale(java.lang.String locale)
Creates a locale from the given string.

Parameters:
locale -
Returns:


Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.