Package org.apache.tiles.core.locale.impl

# Class DefaultLocaleResolver

java.lang.Object
org.apache.tiles.core.locale.impl.DefaultLocaleResolver

All Implemented Interfaces:
  `LocaleResolver`

public class DefaultLocaleResolver extends Object implements LocaleResolver
Default implementation of `LocaleResolver`
It tries to take the locale from the session-scoped attribute `LOCALE_KEY`. If it is not found, it returns the locale included in the request.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `LOCALE_KEY`
  The attribute name that is used to store the current locale.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultLocaleResolver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Locale`
  `resolveLocale(Request request)`
  Resolves the locale.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### LOCALE_KEY

    public static final String LOCALE_KEY
    The attribute name that is used to store the current locale.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DefaultLocaleResolver

    public DefaultLocaleResolver()

- ## Method Details

  - ### resolveLocale

    public Locale resolveLocale(Request request)
    Resolves the locale.
    Specified by:
      `resolveLocale` in interface `LocaleResolver`
    Parameters:
      `request` - The Tiles request object.
    Returns:
      The current locale for the current request.