com.atlassian.core.util
Class LocaleUtils

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

public class LocaleUtils
extends Object


Field Summary
 List<Locale> installedLocales
           
static String LANGUAGE_DESCRIPTOR_FILENAME
           
static String LOCALE_TAG_NAME
           
 
Constructor Summary
LocaleUtils()
           
 
Method Summary
 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.
 Locale getLocale(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 String LANGUAGE_DESCRIPTOR_FILENAME
See Also:
Constant Field Values

LOCALE_TAG_NAME

public static final String LOCALE_TAG_NAME
See Also:
Constant Field Values

installedLocales

public List<Locale> installedLocales
Constructor Detail

LocaleUtils

public LocaleUtils()
Method Detail

getInstalledLocales

public List getInstalledLocales()
                         throws 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:
IOException - when problems arise retrieving resources from the classpath

getLocale

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

Parameters:
locale -
Returns:


Copyright © 2015 Atlassian. All rights reserved.