Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » i18n » [javadoc | source]
org.apache.cocoon.i18n
public class: I18nUtils [javadoc | source]
java.lang.Object
   org.apache.cocoon.i18n.I18nUtils
A utility class for i18n formatting and parsing routing.
Nested Class Summary:
public interface  I18nUtils.LocaleValidator  Callback interface for {@link I18nUtils#findLocale(Map, String, Parameters, Locale, boolean, boolean, boolean, I18nUtils.LocaleValidator)} 
Field Summary
public static final  String NAMESPACE_URI    The namespace for i18n is "http://apache.org/cocoon/i18n/2.1". 
public static final  String OLD_NAMESPACE_URI    The old namespace for i18n is "http://apache.org/cocoon/i18n/2.0". 
Method from org.apache.cocoon.i18n.I18nUtils Summary:
findLocale,   findLocale,   matchesI18nNamespace,   parseLocale,   parseLocale,   storeLocale
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.i18n.I18nUtils Detail:
 public static Locale findLocale(Map objectModel,
    String attribute,
    Parameters parameters,
    Locale defaultLocale,
    boolean useLocale) 
    Find a suitable locale from an objectModel.
 public static Locale findLocale(Map objectModel,
    String attribute,
    Parameters parameters,
    Locale defaultLocale,
    boolean useLocale,
    boolean useLocales,
    boolean useBlankLocale,
    I18nUtils.LocaleValidator test) 
    Find a suitable locale from an objectModel.
 public static boolean matchesI18nNamespace(String uri) 
 public static Locale parseLocale(String localeString) 
    Parses given locale string to Locale object. If the string is null then the VM default locale is returned.
 public static Locale parseLocale(String localeString,
    Locale defaultLocale) 
    Parses given locale string to Locale object. If the string is null or empty then the given locale is returned.
 public static  void storeLocale(Map objectModel,
    String attribute,
    String locale,
    boolean storeInRequest,
    boolean storeInSession,
    boolean storeInCookie,
    boolean createSession) 
    Store locale in request, session, or cookie.