org.apache.cocoon.i18n
Class I18nUtils

java.lang.Object
  |
  +--org.apache.cocoon.i18n.I18nUtils

public class I18nUtils
extends java.lang.Object

A helper class for i18n formatting and parsing routing. Contains static methods only.

Version:
CVS $Id: I18nUtils.java,v 1.4 2002/02/22 07:03:52 cziegeler Exp $
Author:
Konstantin Piroumian

Method Summary
static java.util.Locale parseLocale(java.lang.String localeString)
          Parses given locale string to Locale object.
static java.util.Locale parseLocale(java.lang.String localeString, java.util.Locale defaultLocale)
          Parses given locale string to Locale object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseLocale

public static java.util.Locale parseLocale(java.lang.String localeString,
                                           java.util.Locale defaultLocale)
Parses given locale string to Locale object. If the string is null then the given locale is returned.
Parameters:
localeString - a string containing locale in language_country_variant format.
defaultLocale - returned if localeString is null

parseLocale

public static java.util.Locale parseLocale(java.lang.String localeString)
Parses given locale string to Locale object. If the string is null then the VM default locale is returned.
Parameters:
localeString - a string containing locale in language_country_variant format.
See Also:
parseLocale(String, Locale), Locale.getDefault()


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.