org.pfsw.nls
Class NLSUtil

java.lang.Object
  extended by org.pfsw.nls.NLSUtil

public class NLSUtil
extends java.lang.Object

Provides some utility and convenience methods related NLS. The system property "org.pfsw.nls.path" can be used to specify the path for NLS text file lookup. Its value must be set like a classpath.


Field Summary
protected static java.lang.String SYS_PROP_NLS_PATH
           
 
Method Summary
 java.util.Locale createLocale(java.lang.String localeName)
          Creates a locale from the given name.
static NLSUtil current()
          Returns the only instance this class supports (design pattern "Singleton")
protected  org.pfsw.file.FileUtil fileUtil()
           
 org.pfsw.file.Classpath getNLSLookupPath()
          Returns a classpath that is used to lookup NLS text files.
protected  org.pfsw.text.StringUtil str()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYS_PROP_NLS_PATH

protected static final java.lang.String SYS_PROP_NLS_PATH
See Also:
Constant Field Values
Method Detail

current

public static NLSUtil current()
Returns the only instance this class supports (design pattern "Singleton")


createLocale

public java.util.Locale createLocale(java.lang.String localeName)
Creates a locale from the given name. That is the name is parsed and the different elements separated by '_' are used to instantiate a locale.


getNLSLookupPath

public org.pfsw.file.Classpath getNLSLookupPath()
Returns a classpath that is used to lookup NLS text files.


str

protected org.pfsw.text.StringUtil str()

fileUtil

protected org.pfsw.file.FileUtil fileUtil()